/* A single lightweight, accessible outline SVG style throughout the doctor profile. */
svg.doctor-ui-icon {
    display: inline-block;
    flex: 0 0 auto;
    width: 1em;
    height: 1em;
    vertical-align: -.12em;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
    transform: scale(1.12);
    transform-origin: center;
}

/* Only SVG line icons are enlarged; restored Font Awesome stars/users keep their original shape. */
.nn-review-modal-box.review-form-modern svg.doctor-ui-icon {
    transform: scale(1.12);
    transform-origin: center;
}

/* Scoped reference-inspired public doctor profile. Keeps existing information and review cards. */
.doctor-profile-page-section { background: #eff1f2; color: #172b4a; }
.doctor-profile-page-section .doctor-reference-header {
    display: flex; justify-content: space-between; gap: 28px; align-items: flex-start;
    width: 100%; box-sizing: border-box;
    padding: 12px 15px 9px; margin-bottom: 7px;
    border: 0; border-radius: 12px;
    background: #fff; box-shadow: 0 4px 18px rgba(17,59,101,.045);
}
.doctor-profile-page-section .doctor-reference-identity { display: flex; align-items: flex-start; gap: 13px; min-width: 0; }
.doctor-profile-page-section .doctor-reference-avatar { position: relative; width: 85px; height: 85px; flex: 0 0 85px; display: grid; place-items: center; border-radius: 14px; color: #3a83df; background: #eaf4ff; font-size: 52px; }
.doctor-profile-page-section .doctor-reference-avatar img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.doctor-profile-page-section .doctor-reference-available { position: absolute; bottom: 4px; right: 3px; width: 18px; height: 18px; border-radius: 50%; border: 3px solid #fff; background: #12c46a; }
.doctor-profile-page-section .doctor-reference-identity-copy h1 { font-size: 19px; font-weight: 800; color: #0f2a50; margin: 0 0 5px; }
.doctor-profile-page-section .doctor-reference-identity-copy p { color: #62718a; margin: 0; font-size: 14px; }
.doctor-profile-page-section .doctor-reference-specialty { display: grid; grid-template-columns: 18px minmax(0, 1fr); align-items: center; gap: 9px; }
.doctor-profile-page-section .doctor-reference-specialty .doctor-ui-icon { color: #2789e8; font-size: 14px; width: 18px; text-align: center; }
.doctor-profile-page-section .doctor-reference-meta { display: grid; grid-template-columns: 18px minmax(0, 1fr); align-items: center; gap: 9px; color: #687893; font-size: 12px; margin-top: 6px; }
.doctor-profile-page-section .doctor-reference-meta .doctor-ui-icon { color: #2789e8; font-size: 14px; width: 18px; text-align: center; }
.doctor-profile-page-section .doctor-reference-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 9px; padding-top: 6px; }
.doctor-profile-page-section .doctor-reference-action { border: 0; background: transparent; display: inline-flex; align-items: center; gap: 7px; color: #154f94; font: inherit; font-size: 13px; cursor: pointer; }
.doctor-profile-page-section .doctor-reference-action .doctor-ui-icon { color: #178dec; font-size: 16px; transform: none; }
.doctor-profile-page-section [data-doctor-favorite] .doctor-ui-icon,
.doctor-profile-page-section .doctor-reference-action[aria-pressed="true"] .doctor-ui-icon { color: #e33447; }
.doctor-profile-page-section .doctor-reference-action:focus-visible { outline: 2px solid #197ddd; outline-offset: 4px; border-radius: 4px; }
.doctor-profile-page-section .doctor-reference-stats { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); border: 1px solid #e3e8ef; border-radius: 13px; background: #fff; padding: 7px 6px; box-shadow: 0 5px 22px rgba(18,55,97,.035); }
.doctor-profile-page-section .doctor-reference-stat { display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 3px; min-width: 0; min-height: 43px; text-align: center; color: #5f6e88; font-size: 13px; padding: 0 8px; }
.doctor-profile-page-section .doctor-reference-stat + .doctor-reference-stat { border-right: 1px solid #e2e7ef; }
.doctor-profile-page-section .doctor-reference-stat-value { display: flex; align-items: center; justify-content: center; flex-direction: row; gap: 6px; min-height: 22px; }
.doctor-profile-page-section .doctor-reference-stat-icon { font-size: 19px; margin-bottom: 0; }
.doctor-profile-page-section .doctor-reference-stat-icon--star { color: #ffbd16; }
.doctor-profile-page-section .doctor-reference-stat-icon--recommend { color: #0bba65; fill: currentColor; }
.doctor-profile-page-section .doctor-reference-stat-icon--success { color: #08b7f3; }
.doctor-profile-page-section .doctor-reference-stat-icon--review { color: #168fe8; }
.doctor-profile-page-section .doctor-reference-stat strong { font-size: 16px; font-weight: 800; line-height: 1.25; color: #0f2a50; font-variant-numeric: tabular-nums; }
.doctor-profile-page-section .doctor-reference-nav { display: flex; gap: 4px; margin: 16px 0 20px; border-bottom: 1px solid #d9e1eb; overflow-x: visible; }
.doctor-profile-page-section .doctor-reference-nav a { display: inline-flex; align-items: center; justify-content: center; gap: 6px; flex: 1 1 0; padding: 10px 5px; color: #65738c; font-weight: 700; font-size: 13px; white-space: nowrap; border-bottom: 2px solid transparent; text-decoration: none; scroll-snap-align: start; }
.doctor-profile-page-section .doctor-reference-nav a .doctor-ui-icon { font-size: 16px; }
.doctor-profile-page-section .doctor-reference-nav a.is-active, .doctor-profile-page-section .doctor-reference-nav a[aria-current="location"] { color: #1285e6; border-bottom: 2px solid rgb(239, 15, 15) !important; }
.doctor-profile-page-section .doctor-reference-nav a:focus-visible { outline: 2px solid #168fe8; outline-offset: -3px; }
.doctor-profile-page-section .doctor-reference-section, .doctor-profile-page-section #doctor-info, .doctor-profile-page-section #doctor-reviews { scroll-margin-top: 100px; }
.doctor-profile-page-section .doctor-reference-section { margin: 0 0 29px; }
.doctor-profile-page-section .doctor-reference-section-title { display: flex; align-items: center; gap: 12px; margin: 0 0 13px; color: #142b4b; font-size: 16px; font-weight: 800; }
.doctor-profile-page-section .doctor-reference-section-title .doctor-ui-icon { color: #344054; font-size: 19px; }
.doctor-profile-page-section .doctor-reference-section-shell { padding: 14px; background: #fff; border: 1px solid #e5e9ef; border-radius: 12px; }
.doctor-profile-page-section .doctor-reference-office-card { padding: 18px; border: 0.5px solid #45caf5; border-radius: 12px; box-shadow: 0 3px 15px rgba(16,64,115,.04); background: #fff; }
.doctor-profile-page-section .doctor-reference-office-card + .doctor-reference-office-card { margin-top: 13px; }
.doctor-profile-page-section .doctor-reference-office-card h3 { margin: 0 0 14px; font-size: 15px; color: #142b4b; }
.doctor-profile-page-section .doctor-reference-office-address { display: flex; gap: 10px; margin: 0; color: #405673; line-height: 1.9; font-size: 14px; overflow-wrap: anywhere; }
.doctor-profile-page-section .doctor-reference-office-address .doctor-ui-icon, .doctor-profile-page-section .doctor-reference-first-slot .doctor-ui-icon { color: #138beb; font-size: 17px; flex: 0 0 auto; margin-top: 5px; }
.doctor-profile-page-section .doctor-reference-booking-footer { display: flex; flex-direction: column; gap: 14px; border-top: 1px solid #e9edf3; padding-top: 13px; margin-top: 17px; }
.doctor-profile-page-section .doctor-reference-first-slot { display: inline-flex; align-items: center; gap: 9px; font-size: 13px; color: #50627b; }
.doctor-profile-page-section .doctor-reference-first-slot .doctor-ui-icon { margin-top: 0; }
.doctor-profile-page-section .doctor-reference-book-btn { width: 100%; display: flex; align-items: center; justify-content: center; gap: 15px; padding: 8px 18px; border: none; border-radius: 6px; background: #208af0; color: #fff; font: inherit; font-size: 14px; font-weight: 500; cursor: pointer; }
.doctor-profile-page-section .doctor-reference-book-btn:hover { background: #126ecc; }
.doctor-profile-page-section .doctor-reference-center-note { display: flex; gap: 10px; align-items: flex-start; padding: 15px 6px 2px; font-size: 13px; color: #5b6c83; line-height: 1.7; }
.doctor-profile-page-section .doctor-reference-center-note .doctor-ui-icon { color: #208af0; }
.doctor-profile-page-section .doctor-reference-consult-list { display: flex; flex-direction: column; gap: 13px; }
.doctor-profile-page-section .doctor-reference-consult-card { display: grid; grid-template-columns: minmax(0,1.6fr) minmax(120px,.75fr) minmax(135px,.75fr); align-items: center; gap: 18px; padding: 20px; border-radius: 12px; border: 1px solid #e3e8ef; background: #fff; }
.doctor-profile-page-section .doctor-reference-consult-desc { display: flex; flex-direction: column; gap: 9px; min-width: 0; }
.doctor-profile-page-section .doctor-reference-consult-desc h3 { display: flex; align-items: center; gap: 9px; margin: 0 0 3px; font-size: 15px; color: #172e50; }
.doctor-profile-page-section .doctor-reference-consult-desc h3 .doctor-ui-icon { color: #138bea; font-size: 18px; }
.doctor-profile-page-section .doctor-reference-consult-desc > span { display: flex; gap: 9px; align-items: flex-start; font-size: 13px; color: #566982; line-height: 1.7; }
.doctor-profile-page-section .doctor-reference-consult-desc > span .doctor-ui-icon { width: 16px; color: #168ae7; text-align: center; margin-top: 3px; }
.doctor-profile-page-section .doctor-reference-consult-fee { border-right: 1px solid #e4e8ee; border-left: 1px solid #e4e8ee; padding: 12px 13px; color: #2585d4; text-align: center; font-size: 12px; line-height: 1.9; }
.doctor-profile-page-section .doctor-reference-consult-fee span { display: block; }
.doctor-profile-page-section .doctor-reference-consult-fee strong { display: block; font-size: inherit; font-weight: 800; }
.doctor-profile-page-section .doctor-reference-consult-btn { justify-self: center; width: 100%; max-width: 160px; padding: 8px 18px; border: 1px solid #168ce9; border-radius: 6px; background: #fff; color: #1681d8; font: inherit; font-size: 12px; font-weight: 500; cursor: pointer; }
.doctor-profile-page-section .doctor-reference-consult-btn:hover { background: #eff7ff; }
.doctor-profile-page-section .doctor-reference-empty { padding: 18px; margin: 0; color: #70819a; font-size: 13px; }
.doctor-profile-page-section .doctor-profile-layout { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 20px; }
/* The original content column had a 25px flex gap even between the new header and metrics. */
.doctor-profile-page-section .profile-content-area { gap: 0; }
.doctor-profile-page-section .profile-content-area > .profile-card { margin-bottom: 25px; }
.doctor-profile-page-section .profile-sidebar-card, .doctor-profile-page-section .profile-card { border: 0; box-shadow: 0 4px 18px rgba(17,59,101,.045); }
@media (max-width: 991px) {
    .doctor-profile-page-section .doctor-profile-layout { display: flex; flex-direction: column; gap: 16px; }
    .doctor-profile-page-section .profile-content-area { order: 1; }
    .doctor-profile-page-section .profile-sidebar { order: 2; }
    .doctor-profile-page-section .profile-sidebar-card:not(.contact-info-box) { display: none; }
    .doctor-profile-page-section .doctor-reference-nav { overflow-x: auto; overscroll-behavior-inline: contain; scroll-snap-type: x proximity; }
    .doctor-profile-page-section .doctor-reference-nav a { flex: 0 0 auto; }
}
@media (max-width: 767px) {
    .doctor-profile-page-section .doctor-reference-header { flex-direction: row; align-items: flex-start; justify-content: space-between; gap: 7px; padding: 10px 10px 7px; }
    .doctor-profile-page-section .doctor-reference-avatar { width: 60px; height: 60px; flex-basis: 60px; border-radius: 11px; font-size: 32px; }
    .doctor-profile-page-section .doctor-reference-available { width: 15px; height: 15px; }
    .doctor-profile-page-section .doctor-reference-identity { gap: 8px; flex: 1 1 auto; min-width: 0; }
    .doctor-profile-page-section .doctor-reference-identity-copy { min-width: 0; }
    .doctor-profile-page-section .doctor-reference-actions { flex: 0 0 auto; align-items: flex-start; }
    .doctor-profile-page-section .doctor-reference-identity-copy h1 { font-size: 16px; }
    .doctor-profile-page-section .doctor-reference-identity-copy p { font-size: 12px; }
    .doctor-profile-page-section .doctor-reference-meta { font-size: 11px; gap: 9px; }
    .doctor-profile-page-section .doctor-reference-actions { flex-direction: column; gap: 9px; padding-top: 0; }
    .doctor-profile-page-section .doctor-reference-action { font-size: 11px; gap: 5px; }
    .doctor-profile-page-section .doctor-reference-action .doctor-ui-icon { font-size: 14px; }
    .doctor-profile-page-section .doctor-reference-stats { grid-template-columns: repeat(4,minmax(0,1fr)); padding: 6px 2px; }
    .doctor-profile-page-section .doctor-reference-stat { min-height: 40px; gap: 3px; padding: 0 3px; font-size: 11px; }
    .doctor-profile-page-section .doctor-reference-stat-value { gap: 4px; min-height: 18px; }
    .doctor-profile-page-section .doctor-reference-stat-icon { font-size: 16px; }
    .doctor-profile-page-section .doctor-reference-stat strong { font-size: 14px; }
    .doctor-profile-page-section .doctor-reference-nav { margin: 12px -8px 18px; padding-inline: 8px; gap: 2px; -webkit-overflow-scrolling: touch; scrollbar-width: none; scroll-padding-inline: 8px; }
    .doctor-profile-page-section .doctor-reference-nav::-webkit-scrollbar { display: none; }
    .doctor-profile-page-section .doctor-reference-nav a { flex: 0 0 auto; padding: 8px 8px; gap: 5px; font-size: 11px; }
    .doctor-profile-page-section .doctor-reference-nav a .doctor-ui-icon { font-size: 13px; }
    .doctor-profile-page-section .doctor-reference-section, .doctor-profile-page-section #doctor-info, .doctor-profile-page-section #doctor-reviews { scroll-margin-top: 88px; }
    .doctor-profile-page-section .doctor-reference-section-title { font-size: 15px; gap: 7px; }
    .doctor-profile-page-section .doctor-reference-section-title .doctor-ui-icon { font-size: 17px; }
    .doctor-profile-page-section .doctor-reference-section-shell { padding: 8px; }
    .doctor-profile-page-section .doctor-reference-office-card { padding: 13px; }
    .doctor-profile-page-section .doctor-reference-office-card h3 { font-size: 15px; }
    .doctor-profile-page-section .doctor-reference-office-address { font-size: 12px; }
    .doctor-profile-page-section .doctor-reference-book-btn { font-size: 12px; }
    .doctor-profile-page-section .doctor-reference-consult-card { grid-template-columns: minmax(0,1fr) minmax(95px,.65fr); gap: 8px; padding: 13px; }
    .doctor-profile-page-section .doctor-reference-consult-desc { grid-column: 1 / -1; }
    .doctor-profile-page-section .doctor-reference-consult-desc h3 { font-size: 14px; }
    .doctor-profile-page-section .doctor-reference-consult-desc > span { font-size: 12px; }
    .doctor-profile-page-section .doctor-reference-consult-fee { border-left: 0; border-right: 0; border-top: 1px solid #e5eaf0; padding: 11px 0 0; text-align: right; }
    .doctor-profile-page-section .doctor-reference-consult-btn { max-width: none; font-size: 12px; }
}
@media (max-width: 360px) {
    .doctor-profile-page-section .doctor-reference-stat { font-size: 10px; }
    .doctor-profile-page-section .doctor-reference-identity-copy h1 { font-size: 15px; }
    .doctor-profile-page-section .doctor-reference-nav a { font-size: 10px; }
    .doctor-profile-page-section .doctor-reference-actions { gap: 7px; }
}
@media (prefers-reduced-motion: reduce) {
    .doctor-profile-page-section .doctor-reference-nav, .doctor-profile-page-section .doctor-reference-nav a { scroll-behavior: auto; }
}


/* Unified identity/stats/section navigation: one white surface at every viewport width. */
.doctor-profile-page-section .doctor-reference-top-card {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    padding: 13px 15px 0;
    margin-bottom: 18px;
    background: #fff;
    border: 0;
    border-radius: 12px;
    box-shadow: 0 4px 18px rgba(17,59,101,.045);
}
.doctor-profile-page-section .doctor-reference-top-card .doctor-reference-header {
    width: auto;
    margin: 0;
    padding: 0 0 10px;
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
}
.doctor-profile-page-section .doctor-reference-top-card .doctor-reference-stats {
    margin: 0;
    padding: 9px 4px 6px;
    background: #fff;
    border: 1px solid #e3e9f1;
    border-radius: 10px;
    box-shadow: none;
}
.doctor-profile-page-section .doctor-reference-top-card .doctor-reference-nav {
    margin: 6px -15px 0;
    padding: 0 11px;
    border-top: 1px solid #edf0f5;
    border-bottom: 0;
}
/* New appointment and consultation cards replace the legacy right-hand sidebar cards. */
.doctor-profile-page-section .profile-sidebar {
    position: static;
    top: auto;
    max-height: none;
    overflow: visible;
}
.doctor-profile-page-section .profile-sidebar .doctor-reference-section {
    min-width: 0;
    margin: 0;
}
.doctor-profile-page-section .profile-sidebar .doctor-reference-section-title {
    line-height: 1.7;
}
@media (min-width: 992px) {
    .doctor-profile-page-section .profile-sidebar .doctor-reference-section-shell {
        padding: 9px;
    }
    .doctor-profile-page-section .profile-sidebar .doctor-reference-office-card {
        padding: 13px;
    }
    .doctor-profile-page-section .profile-sidebar .doctor-reference-consult-card {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 12px;
        padding: 14px;
    }
    .doctor-profile-page-section .profile-sidebar .doctor-reference-consult-desc {
        grid-column: 1 / -1;
        border-bottom: 1px solid #e4e8ee;
        padding-bottom: 10px;
    }
    .doctor-profile-page-section .profile-sidebar .doctor-reference-consult-fee {
        grid-column: 1;
        align-self: center;
        text-align: right;
        border: 0;
        padding: 0;
    }
    .doctor-profile-page-section .profile-sidebar .doctor-reference-consult-btn {
        grid-column: 2;
        align-self: center;
        justify-self: start;
        width: auto;
        max-width: none;
        white-space: nowrap;
    }
}
@media (max-width: 991px) {
    /* Flatten the two desktop columns so the mobile order stays:
       summary, office, consultation, medical info/reviews, contact. */
    .doctor-profile-page-section .profile-sidebar,
    .doctor-profile-page-section .profile-content-area {
        display: contents;
    }
    .doctor-profile-page-section .doctor-reference-top-card {
        order: 0;
        margin-bottom: 0;
    }
    .doctor-profile-page-section #doctor-office-booking { order: 1; }
    .doctor-profile-page-section #doctor-consultation { order: 2; }
    .doctor-profile-page-section .profile-content-area > .profile-card {
        order: 3;
        margin-bottom: 0;
    }
    .doctor-profile-page-section .profile-sidebar > .contact-info-box { order: 4; }
}
@media (max-width: 767px) {
    .doctor-profile-page-section .doctor-reference-top-card {
        padding: 10px 8px 0;
        width: 100%;
    }
    .doctor-profile-page-section .doctor-reference-top-card .doctor-reference-header {
        padding: 0 0 8px;
    }
    .doctor-profile-page-section .doctor-reference-top-card .doctor-reference-stats {
        padding: 7px 0 5px;
    }
    .doctor-profile-page-section .doctor-reference-top-card .doctor-reference-nav {
        margin: 8px -8px 0;
        padding-inline: 8px;
    }
}


/* Restore the doctor's header to the right-hand desktop column, above booking. */
.doctor-profile-page-section .profile-sidebar > .doctor-reference-top-card {
    width: 100%;
    min-width: 0;
    margin-bottom: 0;
}
.doctor-profile-page-section .profile-sidebar > .doctor-reference-section {
    box-sizing: border-box;
    min-width: 0;
    width: 100%;
    padding: 15px;
    background: #fff;
    border: 0;
    border-radius: 12px;
    box-shadow: 0 4px 18px rgba(17,59,101,.045);
}
.doctor-profile-page-section .profile-sidebar .doctor-reference-section-title {
    margin: 0 0 14px;
    padding: 0 0 10px;
    border-bottom: 1px solid #edf0f5;
    font-size: 15px;
    line-height: 1.8;
}
.doctor-profile-page-section .profile-sidebar .doctor-reference-section-shell {
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
}
.doctor-profile-page-section .profile-sidebar .doctor-reference-consult-list {
    gap: 10px;
    padding: 0;
    border-radius: 10px;
    background: #fff;
}
.doctor-profile-page-section .profile-sidebar .doctor-reference-consult-card {
    background: #f8faff;
    border: 1px solid #edf1f6;
}
.doctor-profile-page-section .doctor-profile-layout > .profile-content-area {
    min-width: 0;
}
@media (max-width: 991px) {
    /* Flatten the old columns into a real, overflow-safe single-column grid.
       The previous flex + display:contents layout let deep content overflow on mobile. */
    .doctor-profile-page-section .doctor-profile-layout {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        align-items: start;
        gap: 16px;
        width: 100%;
        min-width: 0;
    }
    .doctor-profile-page-section .doctor-profile-layout > .profile-sidebar,
    .doctor-profile-page-section .doctor-profile-layout > .profile-content-area {
        display: contents;
    }
    .doctor-profile-page-section .doctor-profile-layout > .profile-sidebar > *,
    .doctor-profile-page-section .doctor-profile-layout > .profile-content-area > * {
        grid-column: 1 / -1;
        min-width: 0;
        max-width: 100%;
        width: 100%;
        box-sizing: border-box;
    }
    .doctor-profile-page-section .profile-sidebar > .doctor-reference-top-card { order: 0; }
    .doctor-profile-page-section .profile-sidebar > #doctor-office-booking { order: 1; }
    .doctor-profile-page-section .profile-sidebar > #doctor-consultation { order: 2; }
    .doctor-profile-page-section .profile-content-area > .profile-card { order: 3; }
    .doctor-profile-page-section .profile-sidebar > .contact-info-box { order: 4; }
    .doctor-profile-page-section .profile-sidebar .doctor-reference-consult-card {
        grid-template-columns: minmax(0, 1fr) minmax(95px, .65fr);
    }
    .doctor-profile-page-section .profile-sidebar .doctor-reference-consult-desc {
        grid-column: 1 / -1;
    }
    .doctor-profile-page-section .profile-sidebar .doctor-reference-consult-fee {
        border: 0;
        border-top: 1px solid #e4e8ee;
        text-align: right;
        padding: 11px 0 0;
    }
    .doctor-profile-page-section .profile-sidebar .doctor-reference-consult-btn {
        width: 100%;
        max-width: none;
    }
    .doctor-profile-page-section .profile-content-area > .profile-card {
        margin-bottom: 0;
    }
}
@media (max-width: 767px) {
    .doctor-profile-page-section .doctor-profile-layout {
        gap: 13px;
    }
    .doctor-profile-page-section .profile-sidebar > .doctor-reference-section {
        padding: 11px;
    }
    .doctor-profile-page-section .profile-sidebar .doctor-reference-section-title {
        font-size: 14px;
        margin-bottom: 11px;
    }
    .doctor-profile-page-section .profile-sidebar .doctor-reference-consult-card {
        padding: 12px;
    }
}

/* Compact unified detail card. Sizes match the office-booking section heading. */
.doctor-profile-page-section .profile-card.doctor-details-card {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    padding: 0;
    overflow: hidden;
    background: #fff;
    border: 1px solid #d0e2f5;
    border-radius: 22px;
    box-shadow: none;
}
.doctor-profile-page-section .doctor-details-card .doctor-detail-row {
    min-width: 0;
    padding: 14px 18px 12px;
}
.doctor-profile-page-section .doctor-details-card .doctor-detail-row + .doctor-detail-row {
    border-top: 1px solid #e1e8f1;
}
/* Collapsing a long detail should reveal its own heading below the sticky site header. */
.doctor-profile-page-section .doctor-details-card .doctor-detail-row,
.doctor-profile-page-section .doctor-detail-honors {
    scroll-margin-top: 100px;
}
@media (max-width: 767px) {
    .doctor-profile-page-section .doctor-details-card .doctor-detail-row,
    .doctor-profile-page-section .doctor-detail-honors {
        scroll-margin-top: 88px;
    }
}
.doctor-profile-page-section .doctor-detail-heading {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    margin-bottom: 7px;
}
.doctor-profile-page-section .doctor-detail-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 19px;
    width: 19px;
    height: 24px;
    color: #344054;
    background: transparent;
    border: 0;
    border-radius: 0;
    font-size: 19px;
}
.doctor-profile-page-section .doctor-detail-heading h2 {
    min-width: 0;
    margin: 0;
    color: #142b4b;
    font-size: 15px;
    font-weight: 800;
    line-height: 1.7;
    overflow-wrap: anywhere;
}
.doctor-profile-page-section .doctor-detail-body {
    min-width: 0;
    margin-inline-start: 31px;
    color: #50627b;
    font-size: 13px;
    line-height: 1.8;
    overflow-wrap: anywhere;
}
.doctor-profile-page-section .doctor-detail-description p,
.doctor-profile-page-section .doctor-detail-excerpt-content p,
.doctor-profile-page-section .doctor-detail-medical-code { margin: 0; }
.doctor-profile-page-section .doctor-detail-excerpt-content p { white-space: pre-line; }
.doctor-profile-page-section .doctor-detail-excerpt-content strong { font-weight: 600; }
.doctor-profile-page-section .doctor-detail-medical-code {
    margin-top: 10px;
    line-height: 1.75;
}
.doctor-profile-page-section .doctor-detail-medical-code bdi { unicode-bidi: isolate; }

/* The collapsed biography keeps exactly four text lines; the last one fades. */
.doctor-profile-page-section .doctor-detail-excerpt {
    position: relative;
    min-width: 0;
}
.doctor-profile-page-section .doctor-detail-excerpt--about .doctor-detail-excerpt-content {
    line-height: 1.8;
    max-height: calc(4 * 1.8em);
    overflow: hidden;
}
.doctor-profile-page-section .doctor-detail-excerpt--services .doctor-detail-excerpt-content {
    max-height: 53px; /* Two 24px badge rows plus their 5px gap. */
    overflow: hidden;
}
.doctor-profile-page-section .doctor-detail-excerpt.is-expanded {
    padding-bottom: 25px;
}
.doctor-profile-page-section .doctor-detail-excerpt.is-expanded .doctor-detail-excerpt-content {
    max-height: none;
    overflow: visible;
}
.doctor-profile-page-section .doctor-detail-excerpt.is-overflowing:not(.is-expanded)::after {
    content: "";
    position: absolute;
    inset-inline: 0;
    bottom: 0;
    height: 1.8em;
    background: linear-gradient(to bottom, rgba(255,255,255,0), rgba(255,255,255,.94));
    pointer-events: none;
}
.doctor-profile-page-section .doctor-detail-excerpt--services.is-overflowing:not(.is-expanded)::after {
    height: 27px;
}
.doctor-profile-page-section .doctor-detail-toggle {
    position: absolute;
    z-index: 1;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    display: grid;
    place-items: center;
    width: 38px;
    height: 25px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 6px;
    color: #0c7de0;
    background: transparent;
    font: inherit;
    font-size: 16px;
    cursor: pointer;
}
.doctor-profile-page-section .doctor-detail-toggle .doctor-ui-icon { transition: transform .2s ease; }
.doctor-profile-page-section .doctor-detail-toggle[aria-expanded="true"] .doctor-ui-icon { transform: rotate(180deg) scale(1.12); }
.doctor-profile-page-section .doctor-detail-toggle:hover { background: rgba(239,247,255,.8); }
.doctor-profile-page-section .doctor-detail-toggle:focus-visible {
    outline: 2px solid #0c7de0;
    outline-offset: 2px;
}

/* All specialties and priced services share one wrapping flow. */
.doctor-profile-page-section .doctor-detail-tags {
    display: flex;
    flex-wrap: wrap;
    align-content: flex-start;
    align-items: flex-start;
    min-width: 0;
    gap: 5px 6px;
}
.doctor-profile-page-section .doctor-detail-tags .doctor-detail-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    min-height: 24px;
    max-width: 100%;
    padding: 2px 7px;
    border: 1px solid #e0edfb;
    border-radius: 999px;
    color: #097ed9;
    background: #f0f7ff;
    font-size: 11px;
    line-height: 18px;
    overflow-wrap: anywhere;
    white-space: normal;
}
.doctor-profile-page-section .doctor-detail-tags .doctor-detail-tag--service {
    color: #286fae;
    border-color: #e6edf8;
    background: #f7faff;
}
.doctor-profile-page-section .doctor-detail-insurances .insurance-grid {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 22px;
    min-width: 0;
}
.doctor-profile-page-section .doctor-detail-insurances .insurance-item {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    max-width: 100%;
    padding: 3px 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #1486df;
    font-size: 13px;
    line-height: 1.8;
    overflow-wrap: anywhere;
}
.doctor-profile-page-section .doctor-detail-insurances .insurance-item .doctor-ui-icon {
    color: #0c7fdd;
    font-size: 17px;
}
.doctor-profile-page-section .doctor-detail-insurances .insurance-grid p { margin: 0; color: #1688e4; }

@media (max-width: 767px) {
    .doctor-profile-page-section .profile-card.doctor-details-card { border-radius: 16px; }
    .doctor-profile-page-section .doctor-details-card .doctor-detail-row { padding: 12px 11px; }
    .doctor-profile-page-section .doctor-detail-heading { gap: 7px; margin-bottom: 6px; }
    .doctor-profile-page-section .doctor-detail-icon {
        width: 17px;
        height: 22px;
        flex-basis: 17px;
        font-size: 17px;
    }
    .doctor-profile-page-section .doctor-detail-heading h2 { font-size: 14px; }
    .doctor-profile-page-section .doctor-detail-body {
        margin-inline-start: 24px;
        font-size: 12px;
        line-height: 1.8;
    }
    .doctor-profile-page-section .doctor-detail-tags { gap: 4px 5px; }
    .doctor-profile-page-section .doctor-detail-tags .doctor-detail-tag { font-size: 10px; }
    .doctor-profile-page-section .doctor-detail-excerpt--services .doctor-detail-excerpt-content {
        max-height: 52px;
    }
    .doctor-profile-page-section .doctor-detail-insurances .insurance-item { font-size: 12px; }
}
@media (max-width: 360px) {
    .doctor-profile-page-section .doctor-detail-heading h2 { font-size: 14px; }
    .doctor-profile-page-section .doctor-detail-body { margin-inline-start: 0; }
}
@media (prefers-reduced-motion: reduce) {
    .doctor-profile-page-section .doctor-detail-toggle .doctor-ui-icon { transition: none; }
}

/* Eight insurance cards per row on all screen sizes; fade row two only when there are more. */
.doctor-profile-page-section .doctor-detail-excerpt--insurances {
    --insurance-row-height: 86px;
    --insurance-row-gap: 10px;
}
.doctor-profile-page-section .doctor-details-card .doctor-detail-insurances .insurance-grid {
    display: grid;
    grid-template-columns: repeat(8, minmax(0, 1fr));
    align-items: start;
    justify-items: center;
    column-gap: 3px;
    row-gap: var(--insurance-row-gap);
    min-width: 0;
}
/* Two complete rows stay visible; items 17+ appear after the toggle opens. */
.doctor-profile-page-section .doctor-detail-excerpt--insurances:not(.is-expanded) .doctor-detail-excerpt-content {
    max-height: calc(2 * var(--insurance-row-height) + var(--insurance-row-gap));
    overflow: hidden;
}
.doctor-profile-page-section .doctor-detail-excerpt--insurances:not(.is-expanded) .insurance-item:nth-child(n + 17) {
    display: none;
}
.doctor-profile-page-section .doctor-detail-excerpt--insurances.is-expanded .doctor-detail-excerpt-content {
    max-height: none;
    overflow: visible;
}
.doctor-profile-page-section .doctor-detail-excerpt--insurances.is-overflowing:not(.is-expanded)::after {
    height: var(--insurance-row-height);
    background: linear-gradient(to bottom, rgba(255,255,255,.1), rgba(255,255,255,.97));
}
.doctor-profile-page-section .doctor-details-card .doctor-detail-insurances .insurance-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    height: var(--insurance-row-height);
    min-width: 0;
    padding: 0;
    gap: 5px;
    text-align: center;
    color: #425879;
}
.doctor-profile-page-section .doctor-insurance-logo {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: min(48px, 100%);
    height: auto;
    aspect-ratio: 1;
    padding: 7px;
    border: 1px solid #cbd6e3;
    border-radius: 50%;
    background: #fff;
    box-sizing: border-box;
    overflow: hidden;
}
.doctor-profile-page-section .doctor-insurance-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.doctor-profile-page-section .doctor-insurance-logo .doctor-ui-icon { font-size: 19px; }
.doctor-profile-page-section .doctor-insurance-name {
    display: -webkit-box;
    width: 100%;
    max-height: 30px;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    font-size: 10px;
    font-weight: 400;
    line-height: 15px;
    overflow-wrap: anywhere;
}
.doctor-profile-page-section .doctor-detail-honors { margin-top: 12px; }
.doctor-profile-page-section .doctor-detail-honors h3 {
    margin: 0 0 5px;
    font-size: 13px;
    font-weight: 700;
    color: #142b4b;
}
/* Keep eight columns at all sizes; scale down just the logos and captions. */
@media (max-width: 1100px) {
    .doctor-profile-page-section .doctor-insurance-logo {
        width: min(38px, 100%);
        padding: 5px;
    }
    .doctor-profile-page-section .doctor-insurance-name { font-size: 9px; line-height: 13px; max-height: 26px; }
}
@media (max-width: 767px) {
    .doctor-profile-page-section .doctor-detail-excerpt--insurances {
        --insurance-row-height: 69px;
        --insurance-row-gap: 7px;
    }
    .doctor-profile-page-section .doctor-details-card .doctor-detail-insurances .insurance-grid {
        column-gap: 2px;
    }
    .doctor-profile-page-section .doctor-details-card .doctor-detail-insurances .insurance-item { gap: 3px; }
    .doctor-profile-page-section .doctor-insurance-logo {
        width: min(28px, 100%);
        padding: 3px;
    }
    .doctor-profile-page-section .doctor-insurance-logo .doctor-ui-icon { font-size: 12px; }
    .doctor-profile-page-section .doctor-insurance-name {
        font-size: 8px;
        line-height: 11px;
        max-height: 22px;
    }
    .doctor-profile-page-section .doctor-detail-honors h3 { font-size: 12px; }
}
@media (max-width: 360px) {
    .doctor-profile-page-section .doctor-detail-excerpt--insurances { --insurance-row-height: 63px; }
    .doctor-profile-page-section .doctor-insurance-logo {
        width: min(24px, 100%);
        padding: 2px;
    }
    .doctor-profile-page-section .doctor-insurance-name { font-size: 7px; line-height: 10px; max-height: 20px; }
}
@media (prefers-reduced-motion: reduce) {
    .doctor-profile-page-section .doctor-detail-excerpt--insurances .doctor-detail-toggle .doctor-ui-icon {
        transition: none;
    }
}

/* Section-heading icons share the same neutral ink, including contact details and FAQ. */
.doctor-profile-page-section .contact-info-box .doctor-contact-heading,
.doctor-profile-page-section .profile-card .doctor-faq-heading {
    display: flex;
    align-items: center;
    gap: 10px;
}
.doctor-profile-page-section .contact-info-box .doctor-contact-heading .doctor-ui-icon,
.doctor-profile-page-section .profile-card .doctor-faq-heading .doctor-ui-icon {
    flex: 0 0 auto;
    color: #344054;
    font-size: 19px;
}
@media (max-width: 767px) {
    .doctor-profile-page-section .contact-info-box .doctor-contact-heading .doctor-ui-icon,
    .doctor-profile-page-section .profile-card .doctor-faq-heading .doctor-ui-icon {
        font-size: 17px;
    }
}

/* Decorative map preview; the actual location and directions always use clinic coordinates. */
.doctor-profile-page-section .contact-info-box .contact-location-item {
    padding: 14px 0 19px;
    border-bottom: 1px solid #e7ebf0;
}
.doctor-profile-page-section .contact-info-box .contact-location-item:last-of-type {
    border-bottom: 0;
}
.doctor-profile-page-section .doctor-clinic-contact-row {
    display: flex;
    direction: rtl;
    align-items: flex-start;
    gap: 11px;
    padding: 11px 0;
}
.doctor-profile-page-section .doctor-clinic-contact-row + .doctor-clinic-contact-row {
    border-top: 1px solid #edf0f4;
}
.doctor-profile-page-section .doctor-clinic-contact-icon {
    display: grid;
    place-items: center;
    width: 35px;
    height: 35px;
    flex: 0 0 35px;
    border-radius: 50%;
    background: #edf4ff;
    color: #1679e4;
    font-size: 19px;
}
.doctor-profile-page-section .doctor-clinic-contact-row--address .doctor-clinic-contact-icon {
    background: #fff0f2;
    color: #e4384c;
}
.doctor-profile-page-section .doctor-clinic-contact-row--title strong {
    flex: 1;
    min-width: 0;
    margin: 6px 0 0;
    color: #15263f;
    font-size: 14px;
    line-height: 1.65;
}
.doctor-profile-page-section .doctor-clinic-contact-row--address p {
    flex: 1;
    min-width: 0;
    margin: 0;
    color: #344054;
    font-size: 13px;
    line-height: 1.9;
    overflow-wrap: anywhere;
}
.doctor-profile-page-section .doctor-clinic-contact-row--phone {
    margin-bottom: 0;
}
.doctor-profile-page-section .doctor-clinic-contact-row--phone > span:last-child {
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
    padding-top: 1px;
}
.doctor-profile-page-section .doctor-clinic-contact-row--phone small {
    color: #8693a4;
    font-size: 11px;
}
.doctor-profile-page-section .doctor-clinic-contact-row--phone a {
    color: #15263f;
    direction: ltr;
    unicode-bidi: isolate;
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
}
.doctor-profile-page-section .doctor-clinic-map-preview {
    position: relative;
    box-sizing: border-box;
    height: 190px;
    margin-top: 11px;
    overflow: hidden;
    border: 1px solid #e0e6ed;
    border-radius: 12px;
    background: #f1f3f6 url('../images/doctor-clinic-map-preview.svg') center center / cover no-repeat;
}
.doctor-profile-page-section .doctor-clinic-map-open {
    position: absolute;
    inset: 0;
    z-index: 1;
    cursor: pointer;
}
.doctor-profile-page-section .doctor-clinic-directions {
    position: absolute;
    z-index: 2;
    bottom: 12px;
    inset-inline: 12%;
    min-height: 42px;
    display: flex;
    direction: rtl;
    align-items: center;
    justify-content: center;
    gap: 9px;
    border: 1.5px solid #1679e4;
    border-radius: 999px;
    background: rgba(255,255,255,.96);
    box-shadow: 0 2px 5px rgba(20,65,115,.07);
    color: #1679e4;
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
}
.doctor-profile-page-section .doctor-clinic-directions .doctor-ui-icon {
    font-size: 19px;
    transform: none;
    fill: #1679e4;
    stroke: #1679e4;
}
.doctor-profile-page-section .doctor-clinic-directions:hover {
    background: #edf5ff;
    color: #0968d0;
}
.doctor-profile-page-section .doctor-clinic-map-open:focus-visible,
.doctor-profile-page-section .doctor-clinic-directions:focus-visible {
    outline: 3px solid #1679e4;
    outline-offset: -3px;
}
@media (max-width: 767px) {
    .doctor-profile-page-section .doctor-clinic-map-preview {
        height: 165px;
    }
    .doctor-profile-page-section .doctor-clinic-directions {
        min-height: 39px;
        bottom: 10px;
        font-size: 13px;
    }
}


/* Mobile order: profile summary, booking, consultation, medical details, map, reviews. */
@media (max-width: 991px) {
    .doctor-profile-page-section .profile-content-area > .doctor-details-card { order: 3; }
    .doctor-profile-page-section .profile-sidebar > .contact-info-box { order: 4; }
    .doctor-profile-page-section .profile-content-area > .profile-reviews-card { order: 5; }
    .doctor-profile-page-section .profile-content-area > .profile-card:not(.doctor-details-card):not(.profile-reviews-card) { order: 6; }
}

/* Existing map modal button now includes the same lightweight SVG as the preview. */
.doctor-profile-page-section .nn-map-modal-actions .btn-navigate .doctor-ui-icon,
.nn-map-modal-actions .btn-navigate .doctor-ui-icon {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
    stroke: currentColor;
}
.nn-map-app-chooser[hidden] { display: none !important; }
.nn-map-app-chooser {
    position: absolute;
    z-index: 1002;
    inset-inline: 12px;
    bottom: 12px;
    max-height: min(65vh, 500px);
    overflow: auto;
    padding: 14px;
    border: 1px solid #e4e9f0;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 -6px 28px rgba(11, 31, 62, .16);
}
.nn-map-app-chooser-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: #15263f;
    font-size: 15px;
}
.nn-map-app-chooser-heading button {
    border: 0;
    background: #f2f4f7;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    font-size: 20px;
    cursor: pointer;
}
.nn-map-app-chooser-options {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 9px;
    margin-top: 12px;
}
.nn-map-app-chooser-options a {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    min-height: 67px;
    padding: 8px 4px;
    border: 1px solid #e3e8ef;
    border-radius: 11px;
    color: #1679e4;
    text-align: center;
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
}
.nn-map-app-chooser-options a small {
    font-size: 10px;
    font-weight: 400;
    color: #667085;
}
.nn-map-app-chooser-options a:focus-visible,
.nn-map-app-chooser-coordinates button:focus-visible {
    outline: 2px solid #1679e4;
    outline-offset: 2px;
}
.nn-map-app-chooser-note {
    color: #667085;
    margin: 12px 0 8px;
    font-size: 11px;
    line-height: 1.7;
}
.nn-map-app-chooser-coordinates {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    background: #f8faff;
    border-radius: 9px;
    padding: 8px 10px;
}
.nn-map-app-chooser-coordinates bdi {
    direction: ltr;
    font-size: 12px;
}
.nn-map-app-chooser-coordinates button {
    flex: 0 0 auto;
    border: 1px solid #1679e4;
    color: #1679e4;
    border-radius: 7px;
    background: #fff;
    font: inherit;
    font-size: 11px;
    padding: 6px 10px;
    cursor: pointer;
}
.nn-map-app-chooser-feedback {
    margin: 5px 0 0;
    font-size: 11px;
    color: #137547;
}

/* Doctor profile breadcrumb belongs after all content, above modal overlays. */
.doctor-profile-page-section .breadcrumb-top {
    margin: 22px 0 0;
    padding: 8px 0 0;
}
@media (max-width: 767px) {
    /* The first doctor card touches the global mobile header without affecting other cards. */
    .doctor-profile-page-section {
        padding-top: 0;
    }
    /* Only the identity/stats/navigation card bleeds to both viewport edges.
       The site's mobile container keeps 10px padding for every other section. */
    .doctor-profile-page-section .doctor-profile-layout > .profile-sidebar > .doctor-reference-top-card {
        width: calc(100% + 20px);
        max-width: none;
        margin-inline: -10px;
        box-sizing: border-box;
        border-radius: 0;
        padding-top: 20px;
    }
}
