/* ============================================================
   CoDoctor Split Map Layout CSS
   City pages: 40% doctor cards left / 60% map right
   Colors: --blue #218BC7  --dark-blue #0d5a8a  --cyan #4dd0e1
   ============================================================ */

/* ── Split wrapper ── */
.cd-split-wrapper {
    display: flex;
    height: calc(100vh - 64px);
    overflow: hidden;
}

/* ── Left: cards panel ── */
.cd-cards-panel {
    width: 40%;
    overflow-y: auto;
    padding: 16px 20px;
    background: #fff;
    border-right: 1px solid #e8e8f0;
    flex-shrink: 0;
    -webkit-overflow-scrolling: touch;
}

/* ── Right: map panel ── */
.cd-map-panel {
    width: 60%;
    position: relative;
    flex-shrink: 0;
}

.cd-map-panel #map {
    height: 100% !important;
    width: 100% !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

/* ── Breadcrumb ── */
.cd-breadcrumb {
    font-size: 13px;
    color: #aaa;
    margin-bottom: 12px;
}

.cd-breadcrumb a { color: #aaa; text-decoration: none; }
.cd-breadcrumb a:hover { color: #218BC7; }
.cd-breadcrumb span { color: #0d5a8a; font-weight: 600; }

/* ── City heading ── */
.cd-city-h1 {
    font-size: 1.15rem;
    font-weight: 700;
    color: #0d5a8a;
    margin: 8px 0 4px;
    line-height: 1.3;
}

.cd-count-badge {
    display: inline-block;
    background: linear-gradient(135deg, #218BC7, #4dd0e1);
    color: white;
    font-size: 12px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 12px;
    margin-bottom: 12px;
}

/* ── Filter / search inside cards panel ── */
.cd-cards-panel .filter-container { margin-bottom: 10px; }
.cd-cards-panel .search-container { margin-bottom: 12px; max-width: 100%; }

/* ── Individual doctor card ── */
.cd-doctor-card {
    display: flex;
    gap: 12px;
    border-radius: 12px;
    border: 2px solid #e8e8f0;
    padding: 10px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: border-color .15s, box-shadow .15s, background .15s;
    background: white;
}

.cd-doctor-card:hover {
    border-color: #218BC7;
    box-shadow: 0 2px 10px rgba(33,139,199,.18);
}

.cd-doctor-card.active {
    border-color: #218BC7;
    background: rgba(33,139,199,.05);
    box-shadow: 0 2px 10px rgba(33,139,199,.25);
}

/* ── Card image ── */
.cd-card-img {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
}

.cd-card-img-placeholder {
    width: 72px;
    height: 72px;
    border-radius: 8px;
    background: linear-gradient(135deg, #218BC7, #4dd0e1);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: white;
    font-size: 22px;
}

/* ── Card body ── */
.cd-card-body { flex: 1; min-width: 0; }

.cd-card-name {
    font-weight: 700;
    font-size: 13px;
    color: #0d5a8a;
    margin-bottom: 3px;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cd-card-type {
    display: inline-block;
    background: rgba(33,139,199,.12);
    color: #0d5a8a;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 8px;
    margin-bottom: 4px;
}

.cd-card-address {
    font-size: 11px;
    color: #888;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
}

.cd-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cd-card-link {
    display: inline-block;
    background: #218BC7;
    color: white;
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 600;
    text-decoration: none;
    transition: background .15s;
}

.cd-card-link:hover {
    background: #0d5a8a;
    color: white;
    text-decoration: none;
}

/* ── Load more button ── */
.cd-load-more {
    display: block;
    width: 100%;
    padding: 10px;
    background: #fafafa;
    border: 1px dashed #218BC7;
    border-radius: 10px;
    color: #0d5a8a;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: background .15s;
    margin-top: 4px;
    font-family: inherit;
}

.cd-load-more:hover { background: rgba(33,139,199,.08); }

/* ── "View on map" toggle (mobile) ── */
.cd-toggle-map-btn {
    display: none;
    position: absolute;
    bottom: 50%;
    left: 50%;
    transform: translate(-50%, 50%);
    background: rgba(20,20,20,.88);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 11px 24px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    z-index: 500;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    box-shadow: 0 4px 16px rgba(0,0,0,.35);
}

.cd-toggle-map-btn:hover { background: #000; }

/* ── Language dropdown inside cards panel ── */
.cd-cards-panel .dropdown { margin-bottom: 10px; }

/* ── Tablet + Mobile ── */
@media (max-width: 1024px) {
    .cd-split-wrapper {
        flex-direction: column;
        height: auto;
        overflow: visible;
        margin-top: 64px;
    }

    .cd-map-panel {
        order: -1;
        width: 100%;
        height: 240px;
        position: relative;
        overflow: hidden;
        flex-shrink: 0;
    }

    .cd-map-panel #map {
        height: 240px !important;
        pointer-events: none;
        filter: blur(4px);
        opacity: .5;
        transition: filter .3s, opacity .3s;
    }

    .cd-map-panel.map-expanded {
        position: fixed !important;
        inset: 0;
        width: 100vw !important;
        height: 100vh !important;
        z-index: 9999;
        overflow: visible;
    }

    .cd-map-panel.map-expanded #map {
        height: 100% !important;
        pointer-events: all;
        filter: none !important;
        opacity: 1 !important;
    }

    .cd-map-panel.map-expanded .cd-toggle-map-btn {
        display: flex !important;
        bottom: 80px;
        top: auto;
        left: 50%;
        transform: translateX(-50%);
    }

    .cd-cards-panel {
        width: 100%;
        border-right: none;
        border-top: 1px solid #e8e8f0;
        max-height: none;
        overflow-y: visible;
    }

    .cd-toggle-map-btn { display: flex; }

    .cd-doctor-card { padding: 8px; }

    .cd-card-img,
    .cd-card-img-placeholder { width: 60px; height: 60px; }
}
