/* =========================
   CONTACT DOCTOR MODAL (Springbok)
   File: style/practiceModal.css
   Same style as contactModal.css, just reused
   ========================= */

:root {
    color-scheme: dark;
    --modal-backdrop: rgba(2, 6, 8, 0.72);
    --modal-surface: rgba(255, 255, 255, 0.9);
    --modal-surface2: rgba(255, 255, 255, 0.78);
    --modal-line: rgba(255, 255, 255, 0.12);
    --modal-line-dark: rgba(18, 18, 18, 0.12);
    --modal-shadow: 0 26px 90px rgba(0, 0, 0, 0.38);
}

/* wrapper */
.modal {
    position: fixed;
    inset: 0;
    z-index: 12000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 18px;
}

/* open state */
.modal.is-open {
    display: grid;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: radial-gradient(1200px 800px at 15% 0%,
            rgba(18, 192, 138, 0.12),
            transparent 60%),
        var(--modal-backdrop);
    backdrop-filter: blur(6px);
    animation: modalFadeIn 180ms ease-out;
}

/* dialog */
.modal-dialog {
    position: relative;
    width: min(720px, 100%);
    border-radius: 22px;
    padding: 22px;
    box-shadow: var(--modal-shadow);

    background: radial-gradient(900px 650px at 0% 0%,
            rgba(18, 192, 138, 0.14),
            transparent 55%),
        rgba(6, 16, 20, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.12);

    animation: modalPopIn 220ms ease-out;
    transform: translateZ(0);
}

/* close button */
.modal-x {
    position: absolute;
    top: 14px;
    right: 14px;

    width: 42px;
    height: 42px;
    border-radius: 14px;

    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.9);

    font-weight: 900;
    cursor: pointer;
    backdrop-filter: blur(14px);

    transition: transform 0.18s ease, background 0.18s ease,
        border-color 0.18s ease;
}

.modal-x:hover {
    transform: translateY(-2px);
    background: rgba(18, 192, 138, 0.16);
    border-color: rgba(18, 192, 138, 0.26);
}

.modal-head {
    padding-right: 56px;
    margin-bottom: 14px;
}

.modal-eyebrow {
    display: inline-block;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-weight: 800;
    font-size: 0.82rem;
    color: rgba(18, 192, 138, 0.95);
    margin-bottom: 10px;
}

.modal-title {
    margin: 0 0 10px;
    font-size: clamp(1.45rem, 2.6vw, 2rem);
    letter-spacing: -0.02em;
    color: rgba(255, 255, 255, 0.95);
}

.modal-sub {
    margin: 0;
    color: rgba(255, 255, 255, 0.72);
    line-height: 1.65;
}

/* form layout */
.modal-form {
    margin-top: 18px;
}

.modal-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.field {
    display: grid;
    gap: 8px;
}

.field-span {
    grid-column: 1 / -1;
}

.field-label {
    font-weight: 800;
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.92rem;
}

/* inputs */
.field-input {
    width: 100%;
    border-radius: 16px;
    padding: 12px 12px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.92);
    outline: none;
    backdrop-filter: blur(14px);

    transition: border-color 0.16s ease, background 0.16s ease,
        transform 0.16s ease;
}

.field-input::placeholder {
    color: rgba(255, 255, 255, 0.48);
}

.field-input:focus {
    border-color: rgba(18, 192, 138, 0.6);
    background: rgba(255, 255, 255, 0.08);
}

.field-textarea {
    resize: vertical;
    min-height: 120px;
}

/* =========================
   Select styling (match modal dark theme)
   ========================= */


/* actions */
.modal-actions {
    margin-top: 16px;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.modal-note {
    margin: 10px 0 0;
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.92rem;
}

/* small screens */
@media (max-width: 680px) {
    .modal-dialog {
        padding: 18px;
        border-radius: 18px;
    }

    .modal-grid {
        grid-template-columns: 1fr;
    }

    .modal-actions {
        justify-content: stretch;
    }

    .modal-actions .btn {
        width: 100%;
        justify-content: center;
    }
}

/* animations */
@keyframes modalFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes modalPopIn {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.985);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* =========================
   Custom Dropdown (exact styling)
   Selected: dark green bg + dark text
   Not selected: dark bg + white text
   Hover: green shade
   ========================= */

.field-dd {
    position: relative;
}

.dd-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    text-align: left;
    cursor: pointer;
    user-select: none;
}

.dd-value {
    color: rgba(255, 255, 255, .92);
}

.dd-btn .dd-value:empty::before {
    content: attr(data-placeholder);
    color: rgba(255, 255, 255, .48);
}

/* chevron */
.dd-btn::after {
    content: "";
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    opacity: .9;
    background: linear-gradient(180deg, rgba(255, 255, 255, .92), rgba(255, 255, 255, .55));
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M7 10l5 5 5-5'/%3E%3C/svg%3E") center/contain no-repeat;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M7 10l5 5 5-5'/%3E%3C/svg%3E") center/contain no-repeat;
    transition: transform .18s ease;
}

.field-dd.is-open .dd-btn::after {
    transform: rotate(180deg);
}

/* dropdown panel */
.dd-menu {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 10px);
    z-index: 20;

    margin: 0;
    padding: 8px;
    list-style: none;

    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, .12);
    background:
        radial-gradient(900px 420px at 10% 0%, rgba(18, 192, 138, .12), transparent 60%),
        rgba(6, 16, 20, .98);
    box-shadow: 0 26px 90px rgba(0, 0, 0, .45);
    backdrop-filter: blur(14px);

    display: none;
    max-height: 240px;
    overflow: auto;
}

.field-dd.is-open .dd-menu {
    display: block;
}

/* option base (not selected) */
.dd-opt {
    padding: 10px 12px;
    border-radius: 12px;
    color: rgba(255, 255, 255, .92);
    background: transparent;
    cursor: pointer;
    transition: background .14s ease, transform .14s ease, color .14s ease;
}

/* hover = green shade */
.dd-opt:hover {
    background: rgba(18, 192, 138, .18);
}

/* selected = dark green bg + dark text */
.dd-opt[aria-selected="true"] {
    background: rgba(18, 192, 138, .55);
    color: rgba(6, 16, 20, .96);
    /* dark text */
    box-shadow: inset 0 0 0 1px rgba(18, 192, 138, .28);
}

.modal-dialog {
    width: min(860px, 100%);
    max-height: calc(100dvh - 48px);
    /* respects mobile browser UI */
    overflow: auto;
    /* scroll ONLY if needed */
    -webkit-overflow-scrolling: touch;
    /* smooth iOS swipe */
}

/* =========================================================
   SPA THEME OVERRIDES for the Contact Doctor Modal
   Uses: html[data-brand="spa"] ...
   Paste this at the END of practiceModal.css
   ========================================================= */

html[data-brand="spa"] {
    color-scheme: light;
}

/* Backdrop + subtle gold glow */
html[data-brand="spa"] .modal-backdrop {
    background:
        radial-gradient(1200px 800px at 15% 0%,
            rgba(214, 163, 107, .16),
            transparent 60%),
        rgba(10, 12, 12, 0.55);
    backdrop-filter: blur(8px);
}

/* Dialog: light spa surface */
html[data-brand="spa"] .modal-dialog {
    background:
        radial-gradient(900px 650px at 0% 0%,
            rgba(214, 163, 107, .18),
            transparent 55%),
        rgba(255, 255, 255, .96);
    border: 1px solid rgba(18, 18, 18, .10);
    box-shadow: 0 26px 90px rgba(0, 0, 0, .28);
}

/* Close button */
html[data-brand="spa"] .modal-x {
    border: 1px solid rgba(18, 18, 18, .12);
    background: rgba(255, 255, 255, .70);
    color: rgba(18, 18, 18, .82);
    backdrop-filter: blur(14px);
}

html[data-brand="spa"] .modal-x:hover {
    background: rgba(214, 163, 107, .18);
    border-color: rgba(214, 163, 107, .30);
}

/* Head typography */
html[data-brand="spa"] .modal-eyebrow {
    color: rgba(185, 133, 79, .98);
    /* warm gold */
}

html[data-brand="spa"] .modal-title {
    color: rgba(18, 18, 18, .94);
}

html[data-brand="spa"] .modal-sub {
    color: rgba(18, 18, 18, .65);
}

/* Labels */
html[data-brand="spa"] .field-label {
    color: rgba(18, 18, 18, .78);
}

/* Inputs */
html[data-brand="spa"] .field-input {
    border: 1px solid rgba(18, 18, 18, .12);
    background: rgba(255, 255, 255, .85);
    color: rgba(18, 18, 18, .90);
}

html[data-brand="spa"] .field-input::placeholder {
    color: rgba(18, 18, 18, .45);
}

html[data-brand="spa"] .field-input:focus {
    border-color: rgba(214, 163, 107, .60);
    background: rgba(255, 255, 255, .92);
}

/* Custom dropdown (your dd-* version) */
html[data-brand="spa"] .dd-value {
    color: rgba(18, 18, 18, .90);
}

html[data-brand="spa"] .dd-btn .dd-value:empty::before {
    color: rgba(18, 18, 18, .45);
}

/* Chevron in dd button */
html[data-brand="spa"] .dd-btn::after {
    background: linear-gradient(180deg, rgba(18, 18, 18, .86), rgba(18, 18, 18, .45));
}

/* Dropdown panel */
html[data-brand="spa"] .dd-menu {
    border: 1px solid rgba(18, 18, 18, .10);
    background:
        radial-gradient(900px 420px at 10% 0%,
            rgba(214, 163, 107, .14),
            transparent 60%),
        rgba(255, 255, 255, .98);
    box-shadow: 0 26px 90px rgba(0, 0, 0, .22);
}

/* Options */
html[data-brand="spa"] .dd-opt {
    color: rgba(18, 18, 18, .88);
}

html[data-brand="spa"] .dd-opt:hover {
    background: rgba(214, 163, 107, .16);
}

html[data-brand="spa"] .dd-opt[aria-selected="true"] {
    background: rgba(214, 163, 107, .38);
    color: rgba(18, 18, 18, .92);
    box-shadow: inset 0 0 0 1px rgba(214, 163, 107, .22);
}

/* Note text */
html[data-brand="spa"] .modal-note {
    color: rgba(18, 18, 18, .55);
}

/* Small screens (keep your existing layout rules; just tweak spacing) */
@media (max-width: 680px) {
    html[data-brand="spa"] .modal-dialog {
        border-radius: 18px;
    }
}

/* -------------------------
   Dropdown icon: + -> red X
   ------------------------- */

/* reserve room for icon */
.dd-btn {
    position: relative;
    padding-right: 44px;
    /* space for icon */
}

/* icon base */
.dd-btn::after {
    content: "";
    position: absolute;
    right: 14px;
    width: 18px;
    height: 18px;
    opacity: .95;
    pointer-events: none;

    /* default: "+" */
    background: rgba(255, 255, 255, .92);

    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M11 5h2v14h-2zM5 11h14v2H5z'/%3E%3C/svg%3E") center/contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M11 5h2v14h-2zM5 11h14v2H5z'/%3E%3C/svg%3E") center/contain no-repeat;

    transition: background .16s ease, transform .16s ease, opacity .16s ease;
}

/* open: "X" + red */
.field-dd.is-open .dd-btn::after {
    background: rgba(255, 90, 90, .95);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M18.3 5.71 12 12l6.3 6.29-1.41 1.42L10.59 13.4 4.29 19.71 2.88 18.29 9.17 12 2.88 5.71 4.29 4.29 10.59 10.6 16.89 4.29z'/%3E%3C/svg%3E") center/contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M18.3 5.71 12 12l6.3 6.29-1.41 1.42L10.59 13.4 4.29 19.71 2.88 18.29 9.17 12 2.88 5.71 4.29 4.29 10.59 10.6 16.89 4.29z'/%3E%3C/svg%3E") center/contain no-repeat;
}