/* Font Import */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;700&display=swap');

/* Global Reset for Module */
#dls-leaflet-map,
.dls-main-wrapper * {
    box-sizing: border-box;
}

/* NHS Blue Variables */
:root {
    --nhs-blue: #005EB8;
    --nhs-dark-blue: #003087;
    --nhs-bright-blue: #0072CE;
    --nhs-white: #FFFFFF;
    --nhs-warm-yellow: #FFB81C;
    /* For subtle accents/stars */
    --nhs-grey-1: #E8EDEE;
    --nhs-grey-2: #768692;
    --nhs-black: #231f20;
}

/* Section Title - Professional & Trustworthy */
.dls-section-title {
    font-family: 'Outfit', sans-serif;
    font-size: 42px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 40px;
    letter-spacing: -0.02em;
    color: var(--nhs-blue);
    /* Subtle text shadow instead of crazy 3D tilt */
    text-shadow: 0 2px 5px rgba(0, 94, 184, 0.1);
}

/* Main Wrapper - The "Clinic" Feel */
.dls-main-wrapper {
    display: flex;
    flex-direction: row;
    height: 650px;
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    font-family: 'Outfit', sans-serif;

    /* Clean NHS background: White/Light Grey Gradient */
    background: linear-gradient(180deg, #FFFFFF 0%, #F0F4F5 100%);
    border: 1px solid #d8dde0;

    box-shadow:
        0 10px 30px -10px rgba(0, 48, 135, 0.15),
        /* Deep Blue Shadow */
        0 0 0 1px rgba(255, 255, 255, 1) inset;

    /* 3D Perspective Container */
    perspective: 1500px;
}

/* Sidebar - Professional Glass */
.dls-sidebar {
    width: 340px;
    flex-shrink: 0;
    overflow-y: auto;
    z-index: 10;

    /* Professional clean sidebar */
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-right: 1px solid #d8dde0;

    display: flex;
    flex-direction: column;
    padding: 20px;
}

/* Custom Scrollbar */
.dls-sidebar::-webkit-scrollbar {
    width: 6px;
}

.dls-sidebar::-webkit-scrollbar-track {
    background: #f0f4f5;
}

.dls-sidebar::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

/* List Items - Medical Cards */
.dls-list-item {
    margin-bottom: 15px;
    padding: 20px;
    background: #FFFFFF;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    border: 1px solid #e8edee;

    /* Auto-animate position */
    transform-origin: center left;
    transform: translateZ(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    /* Subtle shadow */
}

.dls-list-item:hover {
    transform: translateX(8px);
    /* Slide, don't rotate too much */
    border-color: var(--nhs-blue);
    box-shadow:
        0 4px 12px rgba(0, 94, 184, 0.15);
    z-index: 2;
}

.dls-list-item.active {
    background: #F0F4F5;
    border-left: 4px solid var(--nhs-blue);
    /* NHS Blue Stripe */
    border-top: 1px solid #e8edee;
    border-right: 1px solid #e8edee;
    border-bottom: 1px solid #e8edee;
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(0, 94, 184, 0.1);
}

.dls-list-title {
    font-weight: 700;
    color: var(--nhs-dark-blue);
    font-size: 16px;
    margin-bottom: 6px;
}

.dls-list-location {
    font-size: 12px;
    color: var(--nhs-grey-2);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dls-list-location::before {
    content: '';
    display: block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--nhs-bright-blue);
}

/* Map Container */
.dls-map-container {
    flex-grow: 1;
    position: relative;
    height: 100%;
    z-index: 1;
}

#dls-leaflet-map {
    width: 100%;
    height: 100%;
    z-index: 5;
    outline: none;
}

/* POPUPS - Medical Professional Style */
.leaflet-popup-content-wrapper {
    background: #FFFFFF;
    border-radius: 12px;
    padding: 0;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2) !important;
    border: 1px solid #e8edee;
}

.leaflet-popup-tip {
    background: #FFFFFF;
    border-top: 1px solid #e8edee;
    /* Visual consistency */
}

.leaflet-popup-content {
    margin: 0;
    width: 350px !important;
    font-family: 'Outfit', sans-serif;
}

.dls-popup-container {
    display: flex;
    flex-direction: column;
}

.dls-popup-image {
    width: 100%;
    height: 180px;
    background-size: cover;
    background-position: center;
    position: relative;
    border-bottom: 4px solid var(--nhs-blue);
    /* Brand accent */
}

.dls-popup-content {
    padding: 24px;
    background: #FFFFFF;
}

.dls-popup-header {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.dls-popup-location {
    background: #E8F4FD;
    /* Light blue bg */
    color: var(--nhs-dark-blue);
    padding: 4px 10px;
    border-radius: 4px;
    /* Square off slightly for pro feel */
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.dls-popup-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--nhs-black);
    line-height: 1.2;
    margin: 5px 0;
}

.dls-popup-doctor-name {
    font-size: 14px;
    color: var(--nhs-grey-2);
    font-weight: 600;
    font-style: normal;
    /* Remove italic for more corporate/med feel */
    margin-bottom: 15px;
}

.dls-popup-desc {
    font-size: 15px;
    line-height: 1.6;
    color: #425563;
    margin-bottom: 25px;
}

.dls-popup-button {
    display: block;
    text-align: center;
    padding: 12px 0;
    background-color: var(--nhs-blue);
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s ease;
    box-shadow: 0 4px 6px rgba(0, 94, 184, 0.2);
}

.dls-popup-button:hover {
    background-color: var(--nhs-dark-blue);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 48, 135, 0.25);
    color: white;
}

/* Close Button */
.leaflet-container a.leaflet-popup-close-button {
    color: #fff;
    background: rgba(0, 94, 184, 0.8);
    /* Blue transparent */
    border-radius: 50%;
    width: 28px;
    height: 28px;
    line-height: 28px;
    top: 15px;
    right: 15px;
    font-size: 18px;
    transition: all 0.2s;
    border: 2px solid white;
}

.leaflet-container a.leaflet-popup-close-button:hover {
    background: var(--nhs-dark-blue);
    color: #fff;
}

/* Responsive */
@media (max-width: 768px) {
    .dls-main-wrapper {
        flex-direction: column;
        height: auto !important;
    }

    .dls-sidebar {
        width: 100%;
        max-height: 280px;
        background: #F0F4F5;
        border-right: none;
    }

    .dls-list-item {
        margin-bottom: 10px;
    }
}