﻿/*==================================================
    GIS UI v2
    Primary Color : #1E88E5
==================================================*/

:root {
    --primary: #1E88E5;
    --primary-hover: #1565C0;
    --primary-light: #E3F2FD;
    --bg: #F8FAFC;
    --border: #E5E7EB;
    --radius: 16px;
    --shadow: 0 4px 12px rgba(15,23,42,.06);
    --shadow-hover: 0 12px 32px rgba(30,136,229,.16);
}

.home-page {
    display: flex;
    width: 100%;
    height: calc(100vh - 72px);
    overflow: hidden;
}

/* دسکتاپ */
.sidebar {
    width: 380px;
    min-width: 380px;
    background: #fff;
    border-left: 1px solid #E5E7EB;
    overflow-y: auto;
    z-index: 2;
}

.map-container {
    flex: 1;
    position: relative;
    min-width: 0;
}

#map {
    width: 100%;
    height: 100%;
}

/* موبایل */
@media (max-width:991px) {

    .sidebar {
        position: fixed;
        top: 72px;
        right: 0;
        width: 88%;
        max-width: 340px;
        height: calc(100vh - 72px);
        transform: translateX(100%);
        transition: .3s;
        z-index: 1000;
    }

        .sidebar.open {
            transform: translateX(0);
        }

    .map-container {
        width: 100%;
    }
}

#scroll-loader {
    width: 100%;
    min-height: 1px;
}

.agency-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 18px 0;
    color: #6B7280;
    font-size: 13px;
}

    .agency-loading[hidden] {
        display: none;
    }

.agency-loading-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #E5E7EB;
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: agency-loading-spin .7s linear infinite;
}

@keyframes agency-loading-spin {

    to {
        transform: rotate(360deg);
    }
}

/*====================================*/

.search-card {
    margin: 18px;
    padding: 22px;
    background: #FFF;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

    .search-card h5 {
        margin: 0 0 18px;
        font-size: 18px;
        font-weight: 700;
        color: #1F2937;
    }

/*====================================*/

.agency-list {
    flex: 1;
    overflow: auto;
    padding: 0 18px 18px;
}

.agency-list-header {
    margin-bottom: 14px;
    color: #6B7280;
    font-size: 14px;
    font-weight: 600;
}

/*====================================*/

.agency-card {
    background: #FFF;
    border-radius: 16px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    padding: 18px;
    margin-bottom: 16px;
    cursor: pointer;
    transition: .25s ease;
    position: relative;
    overflow: hidden;
}

    /* نوار انتخاب */

    .agency-card.selected {
        border-color: var(--primary);
        box-shadow: var(--shadow-hover);
        transform: translateY(-3px);
    }

        .agency-card.selected::after {
            content: "";
            position: absolute;
            top: 0;
            right: 0;
            width: 5px;
            height: 100%;
            background: var(--primary);
        }

    /* Hover */

    .agency-card:hover {
        transform: translateY(-4px);
        box-shadow: var(--shadow-hover);
        border-color: #90CAF9;
    }

/*====================================*/

.agency-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.agency-type {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--primary-light);
    color: var(--primary);
    padding: 6px 12px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 700;
}

.agency-code {
    background: #F3F4F6;
    color: #6B7280;
    padding: 5px 10px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 700;
}

/*====================================*/

.agency-name {
    margin-bottom: 16px;
    font-size: 19px;
    font-weight: 800;
    color: #111827;
}

/*====================================*/

.agency-info {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 18px;
}

    .agency-info div {
        display: flex;
        align-items: center;
        gap: 10px;
        color: #4B5563;
        font-size: 14px;
    }

    .agency-info i {
        width: 34px;
        height: 34px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        background: var(--primary-light);
        color: var(--primary);
    }

/*====================================*/

.agency-actions {
    display: flex;
    gap: 10px;
}

    .agency-actions .btn {
        flex: 1;
        height: 42px;
        border-radius: 10px;
        font-weight: 600;
    }

/*====================================*/

.btn-map {
    background: #FFF;
    border: 1px solid var(--primary);
    color: var(--primary);
}

    .btn-map:hover {
        background: var(--primary);
        color: #FFF;
    }

/*====================================*/

.btn-route {
    background: var(--primary);
    color: #FFF;
    border: none;
}

    .btn-route:hover {
        background: var(--primary-hover);
    }

/*====================================*/

.agency-list::-webkit-scrollbar {
    width: 7px;
}

.agency-list::-webkit-scrollbar-thumb {
    background: #90CAF9;
    border-radius: 20px;
}

    .agency-list::-webkit-scrollbar-thumb:hover {
        background: var(--primary);
    }

.agency-list::-webkit-scrollbar-track {
    background: #EDF2F7;
}

