.dentist-map-full-container {
    width: 100%;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
}

/* Filter Bar Styles */
.map-filter-bar {
    background: #fff;
    padding: 15px 20px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    flex-wrap: nowrap;
    gap: 15px;
    z-index: 10;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    overflow-x: auto;
    scrollbar-width: thin;
}

.map-filter-bar::-webkit-scrollbar {
    height: 6px;
}
.map-filter-bar::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}

.filter-content-wrap {
    display: flex;
    flex: 1;
    gap: 15px;
    min-width: max-content;
}

.filter-group {
    display: flex;
    gap: 15px;
    flex: 1;
    min-width: max-content;
}

.map-filter-select {
    flex: 1;
    min-width: 120px;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 0.9rem;
    color: #333;
    background-color: #f9f9f9;
    cursor: pointer;
    transition: all 0.2s;
}

.map-filter-select:focus {
    border-color: #007bff;
    outline: none;
    background-color: #fff;
}

.map-filter-select:disabled {
    background-color: #eee;
    cursor: not-allowed;
    opacity: 0.6;
}

.dentist-map-layout {
    display: flex;
    height: 600px;
    width: 100%;
    background: #f8f9fa;
    overflow: hidden;
    font-family: 'Inter', sans-serif;
    border-radius: 12px;
    margin-bottom: 20px;
}

.dentist-list-side {
    width: 40%;
    display: flex;
    flex-direction: column;
    background: #fff;
    border-right: 1px solid #e1e4e8;
}

.map-side {
    flex: 1;
    position: relative;
}

#dentist-leaflet-map {
    width: 100%;
    height: 100%;
    z-index: 1; /* keep below filters */
}

/* Header */
.list-header {
    padding: 24px;
    border-bottom: 1px solid #eee;
}

.list-header h2 {
    margin: 0 0 12px 0;
    font-size: 1.25rem;
    color: #1a1a1a;
}

.map-premium-btn {
    background: #fff;
    border: 1px solid #ddd;
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.map-premium-btn:hover {
    background: #f0f0f0;
    border-color: #ccc;
}

/* Cards Area */
.cards-scroll, .cards-layout {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

.dentist-list-wrap {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e1e4e8;
}

.dentist-card-map {
    display: flex;
    gap: 16px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

.dentist-card-map:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.08);
    border-color: #007bff;
}

.dentist-card-map.highlighted {
    border-color: #007bff;
    background: #f0f7ff;
}

.dentist-card-map.premium-highlight {
    border: 2px solid #ffc107;
    background: #fffcf0;
}

.premium-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #ffc107;
    color: #000;
    font-size: 0.6rem;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 4px;
    z-index: 2;
}

.card-img-wrapper {
    width: 100px;
    height: 100px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    position: relative; /* Added for badge positioning */
}

.card-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-info-wrapper {
    flex: 1;
}

.card-info-wrapper h3 {
    margin: 0 0 4px 0;
    font-size: 1.1rem;
    color: #333;
}

.card-address {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 4px;
    line-height: 1.4;
}

.card-plano-saude {
    font-size: 0.75rem;
    color: #888;
    margin-bottom: 10px;
    font-style: italic;
}

.agenda-snippet {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    color: #28a745;
    margin-bottom: 12px;
}

.card-actions {
    display: flex;
    gap: 10px;
}

.btn-agenda-consulta {
    padding: 8px 16px;
    background: #007bff;
    color: #fff;
    border-radius: 6px;
    font-size: 0.8rem;
    text-decoration: none;
    font-weight: bold;
    flex: 1;
    text-align: center;
    transition: background 0.2s;
}

.btn-agenda-consulta:hover {
    background: #0056b3;
}

/* Map Popups */
.leaflet-popup-content-wrapper {
    border-radius: 12px;
    padding: 0;
    overflow: hidden;
}

.leaflet-popup-content {
    margin: 0;
    width: 200px !important;
}

.popup-inner {
    padding: 12px;
}

.popup-inner img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: 8px 8px 0 0;
    margin-bottom: 8px;
}

.popup-inner h4 {
    margin: 0 0 4px 0;
}

/* loading placeholder */
.loading-placeholder {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 200px;
    color: #999;
}

/* Mobile specific blocks (hidden on desktop) */
.mobile-filter-btn {
    display: none;
}
.filter-header-mobile, .filter-footer-mobile {
    display: none;
}
.filter-overlay {
    display: none;
}
.mobile-view-toggle {
    display: none;
}

/* Responsive */
@media (max-width: 1024px) {
    .dentist-list-side {
        width: 45%;
    }
}

@media (max-width: 768px) {
    /* Mobile Filter Button */
    .mobile-filter-btn {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 8px;
        padding: 12px;
        background: #fff;
        border: 1px solid #ccc;
        border-radius: 50px;
        margin: 10px auto;
        font-weight: bold;
        width: 150px;
        box-shadow: 0 4px 10px rgba(0,0,0,0.1);
        cursor: pointer;
        z-index: 20;
    }

    /* Inline Accordion Filter Layout */
    .filter-overlay {
        display: none !important;
    }

    .map-filter-bar {
        display: none; /* JS will toggle */
        flex-direction: column;
        padding: 0;
        gap: 0;
        border: 1px solid #eee;
        border-radius: 12px;
        margin: 10px 20px 20px 20px;
        position: static;
        width: auto;
        overflow: hidden;
    }

    .filter-header-mobile {
        display: flex;
        justify-content: center;
        align-items: center;
        padding: 20px;
        border-bottom: 1px solid #eee;
        position: relative;
    }
    .filter-header-mobile h3 {
        margin: 0;
        font-size: 1.1rem;
        font-weight: bold;
    }
    #close-mobile-filter {
        position: absolute;
        left: 20px;
        background: none;
        border: none;
        font-size: 1.5rem;
        cursor: pointer;
    }

    .filter-content-wrap {
        padding: 20px;
        overflow-y: auto;
        flex: 1;
        display: flex;
        flex-direction: column;
        gap: 20px;
    }

    .filter-group {
        min-width: 100%;
        flex-direction: column;
    }

    .map-filter-select {
        padding: 14px;
        font-size: 1rem;
        border-radius: 10px;
    }

    .filter-footer-mobile {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 15px 20px;
        border-top: 1px solid #eee;
        background: #fff;
    }
    .btn-clear-filters {
        background: none;
        border: none;
        text-decoration: underline;
        font-weight: 600;
        color: #333;
        cursor: pointer;
    }
    .btn-apply-filters {
        background: #222;
        color: #fff;
        border: none;
        padding: 12px 24px;
        border-radius: 8px;
        font-weight: bold;
        cursor: pointer;
    }

    /* Map / List Layout (For mixed shortcode only) */
    .dentist-map-layout {
        position: relative;
        flex: 1;
        height: 600px;
    }

    /* Floating View Toggle */
    .mobile-view-toggle {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 8px;
        position: fixed;
        bottom: 30px;
        left: 50%;
        transform: translateX(-50%);
        background: #222;
        color: #fff;
        border: none;
        padding: 12px 24px;
        border-radius: 30px;
        font-weight: bold;
        z-index: 30;
        box-shadow: 0 4px 12px rgba(0,0,0,0.2);
        cursor: pointer;
        transition: background 0.2s;
    }

    .mobile-view-toggle:hover {
        background: #000;
    }

    /* Airbnb Style Cards */
    .dentist-card-map {
        flex-direction: column;
        padding: 0;
        border-radius: 12px;
        overflow: hidden;
        border: none;
        box-shadow: 0 2px 8px rgba(0,0,0,0.08);
        gap: 0;
        margin-bottom: 24px;
    }

    .card-img-wrapper {
        width: 100%;
        height: 220px;
        border-radius: 0;
    }

    .premium-badge {
        top: 12px;
        left: 12px;
        right: auto;
        background: rgba(255, 255, 255, 0.9);
        color: #333;
        padding: 6px 10px;
        font-size: 0.8rem;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
        border-radius: 20px;
        display: flex;
        align-items: center;
        gap: 4px;
    }
    
    .premium-badge::before {
        content: '🏆';
    }

    .card-info-wrapper {
        padding: 16px;
    }

    .card-info-wrapper h3 {
        font-size: 1.2rem;
        font-weight: 600;
        margin-bottom: 8px;
    }
    
    .card-address {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .map-side {
        height: 250px;
    }
    
    .card-actions {
        flex-direction: column;
    }

    .btn-agenda-consulta {
        width: 100%;
    }
}

/* TV / Large Screens (High density) */
@media (min-width: 1921px) {
    .dentist-map-layout {
        height: 800px;
    }
    .dentist-list-side {
        width: 30%;
    }
    .card-info-wrapper h3 {
        font-size: 1.4rem;
    }
    .map-filter-select {
        font-size: 1.1rem;
    }
}

.card-pagamentos {
    font-size: 0.8rem;
    color: #444;
    margin-bottom: 6px;
    line-height: 1.4;
}

.card-pagamentos strong {
    color: #1a1a1a;
    font-weight: 700;
}
