
/* ==========================================
   SPINE CARE BLR - SECOND OPINION POPUP
========================================== */

:root {
    --scbl-navy: #31358d;
    --scbl-blue: #2d4ca8;
    --scbl-teal: #31cbb5;
    --scbl-dark: #142b47;
    --scbl-border: #dce5ef;
    --scbl-muted: #68798d;
}

/* ==========================================
   FLOATING BUTTON
========================================== */

.scbl-opinion-fab {
    position: fixed;
    right: 26px;
    bottom: 26px;
    z-index: 99998;

    width: 64px;
    height: 64px;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 0 18px;
    border: 1px solid rgba(255,255,255,.2);
    border-radius: 999px;

    color: #fff;
    background: linear-gradient(
        135deg,
        var(--scbl-navy),
        var(--scbl-blue)
    );

    box-shadow:
        0 12px 28px rgba(24,49,116,.28),
        0 3px 8px rgba(24,49,116,.12);

    cursor: pointer;
    overflow: hidden;
    white-space: nowrap;

    transition:
        width .38s cubic-bezier(.2,.8,.2,1),
        transform .3s ease,
        box-shadow .3s ease;

    font-family: inherit;
}

.scbl-opinion-fab::before {
    content: "";
    position: absolute;
    inset: -30%;
    border-radius: inherit;

    background: linear-gradient(
        110deg,
        transparent 35%,
        rgba(255,255,255,.18) 50%,
        transparent 65%
    );

    transform: translateX(-130%);
    transition: transform .65s ease;
    pointer-events: none;
}

.scbl-opinion-fab:hover,
.scbl-opinion-fab:focus-visible {
    width: 207px;
    transform: translateY(-4px);

    box-shadow:
        0 18px 42px rgba(24,49,116,.34),
        0 6px 14px rgba(24,49,116,.14);
}

.scbl-opinion-fab:hover::before {
    transform: translateX(130%);
}

.scbl-fab-icon {
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    display: grid;
    place-items: center;
}

.scbl-fab-icon svg {
    width: 27px;
    height: 27px;
}

.scbl-fab-text {
    display: block;
    width: 0;
    max-width: 0;
    opacity: 0;
    margin-left: 0;
    overflow: hidden;

    color: #fff;
    font-size: 15px;
    font-weight: 650;
    letter-spacing: .1px;

    transform: translateX(-8px);

    transition:
        width .35s ease,
        max-width .35s ease,
        margin .35s ease,
        opacity .3s ease,
        transform .35s ease;
}

.scbl-opinion-fab:hover .scbl-fab-text,
.scbl-opinion-fab:focus-visible .scbl-fab-text {
    width: 122px;
    max-width: 122px;
    margin-left: 11px;
    opacity: 1;
    transform: translateX(0);
}

/* ==========================================
   POPUP OVERLAY
========================================== */

.scbl-opinion-overlay[hidden] {
    display: none !important;
}

.scbl-opinion-overlay {
    position: fixed;
    inset: 0;
    z-index: 999999;

    display: grid;
    place-items: center;

    padding: 20px;

    background: rgba(8,19,48,.72);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);

    animation: scblFadeIn .25s ease both;
}

body.scbl-opinion-lock {
    overflow: hidden;
}

.scbl-opinion-modal {
    width: min(100%, 560px);
    max-height: calc(100dvh - 40px);

    overflow-y: auto;
    overscroll-behavior: contain;

    border-radius: 22px;
    background: #fff;

    box-shadow:
        0 30px 90px rgba(4,15,43,.3),
        0 10px 28px rgba(4,15,43,.16);

    animation: scblModalIn .4s cubic-bezier(.2,.8,.2,1) both;
}

.scbl-opinion-modal:focus {
    outline: none;
}

@keyframes scblFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes scblModalIn {
    from {
        opacity: 0;
        transform: translateY(22px) scale(.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ==========================================
   HEADER
========================================== */

.scbl-opinion-header {
    position: relative;
    padding: 29px 34px 27px;

    background: linear-gradient(
        125deg,
        #31358d 0%,
        #29499f 72%,
        #207b9e 100%
    );

    color: #fff;
    overflow: hidden;
}

.scbl-opinion-header::after {
    content: "";
    position: absolute;

    width: 225px;
    height: 225px;

    right: -90px;
    top: -115px;

    border: 1px solid rgba(255,255,255,.15);
    border-radius: 50%;

    box-shadow:
        0 0 0 35px rgba(255,255,255,.035),
        0 0 0 75px rgba(255,255,255,.025);

    pointer-events: none;
}

.scbl-opinion-close {
    position: absolute;
    top: 18px;
    right: 20px;
    z-index: 3;

    display: grid;
    place-items: center;

    width: 35px;
    height: 35px;

    border: 1px solid rgba(255,255,255,.25);
    border-radius: 50%;

    background: rgba(255,255,255,.1);
    color: #fff;

    font-size: 25px;
    font-weight: 400;
    line-height: 1;

    cursor: pointer;
    transition: all .25s ease;
}

.scbl-opinion-close:hover {
    background: #fff;
    color: var(--scbl-navy);
    transform: rotate(90deg);
}

.scbl-header-icon {
    display: grid;
    place-items: center;

    width: 43px;
    height: 43px;
    margin-bottom: 14px;

    border-radius: 12px;

    background: var(--scbl-teal);
    color: #fff;
}

.scbl-header-icon svg {
    width: 25px;
    height: 25px;
}

.scbl-header-eyebrow {
    display: block;
    margin-bottom: 7px;

    color: #b6f7ed;
    font-size: 11px;
    font-weight: 750;
    letter-spacing: 2px;
}

.scbl-opinion-header h2 {
    margin: 0 0 9px;
    padding: 0;

    color: #fff;
    font-size: clamp(24px, 3vw, 30px);
    font-weight: 750;
    line-height: 1.2;
    letter-spacing: -.7px;
}

.scbl-opinion-header h2 span {
    color: #a3f5e8;
}

.scbl-opinion-header p {
    margin: 0;
    max-width: 410px;

    color: #e4ecfc;
    font-size: 15px;
    line-height: 1.65;
}

/* ==========================================
   FORM
========================================== */

.scbl-opinion-content {
    padding: 28px 34px 30px;
}

.scbl-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: 18px 16px;
}

.scbl-full {
    grid-column: 1 / -1;
}

.scbl-field {
    min-width: 0;
}

.scbl-field > label:not(.scbl-upload-box) {
    display: block;

    margin-bottom: 8px;

    color: var(--scbl-dark);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.5;
}

.scbl-field > label span:not(.scbl-optional) {
    color: #e45d65;
}

.scbl-field input:not([type="file"]) {
    display: block;
    width: 100%;
    height: 47px;
    box-sizing: border-box;

    padding: 0 14px;

    border: 1px solid var(--scbl-border);
    border-radius: 9px;

    outline: none;
    background: #f9fbfe;

    color: var(--scbl-dark);
    font-family: inherit;
    font-size: 15px;

    box-shadow: none;

    transition:
        border-color .25s ease,
        box-shadow .25s ease,
        background .25s ease;
}

.scbl-field input::placeholder {
    color: #98a6b6;
    opacity: 1;
}

.scbl-field input:not([type="file"]):focus {
    border-color: var(--scbl-blue);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(45,76,168,.09);
}

.scbl-optional {
    color: #8b99aa;
    font-size: 12px;
    font-weight: 450;
}

/* ==========================================
   UPLOAD FIELD
========================================== */

.scbl-upload-box {
    display: flex;
    align-items: center;
    flex-direction: column;
    justify-content: center;

    min-height: 134px;
    box-sizing: border-box;
    padding: 17px;

    border: 1.5px dashed #a8c5d9;
    border-radius: 12px;

    background: #f3f9fc;
    text-align: center;
    cursor: pointer;

    transition:
        border-color .25s ease,
        background .25s ease,
        transform .25s ease;
}

.scbl-upload-box:hover,
.scbl-upload-box:focus-within {
    border-color: var(--scbl-teal);
    background: #edfbf8;
}

.scbl-upload-icon {
    display: grid;
    place-items: center;

    width: 38px;
    height: 38px;
    margin-bottom: 8px;

    border-radius: 10px;
    background: #e0ecfc;
    color: var(--scbl-blue);
}

.scbl-upload-icon svg {
    width: 22px;
    height: 22px;
}

.scbl-upload-box strong {
    display: block;
    max-width: 100%;

    color: var(--scbl-blue);
    font-size: 13px;
    font-weight: 700;

    overflow-wrap: anywhere;
}

.scbl-upload-box small {
    display: block;
    margin-top: 5px;

    color: var(--scbl-muted);
    font-size: 11px;
    line-height: 1.5;
}

.scbl-file-input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    overflow: hidden;
}

.scbl-upload-box:has(+ .scbl-file-input:focus-visible) {
    outline: 3px solid rgba(45,76,168,.22);
    outline-offset: 3px;
}

.scbl-upload-box.has-file {
    border-color: var(--scbl-teal);
    background: #effbf7;
}

/* ==========================================
   CONSENT
========================================== */

.scbl-consent {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 21px;

    cursor: pointer;
}

.scbl-consent input {
    flex: 0 0 16px;
    width: 16px;
    height: 16px;
    margin: 3px 0 0;

    accent-color: var(--scbl-blue);
    cursor: pointer;
}

.scbl-consent span {
    color: #64758a;
    font-size: 12px;
    line-height: 1.65;
}

.scbl-consent a {
    color: var(--scbl-blue);
    text-decoration: underline;
}

/* ==========================================
   SUBMIT BUTTON
========================================== */

.scbl-submit-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;

    width: 100%;
    min-height: 51px;
    margin-top: 22px;
    padding: 12px 20px;

    border: none;
    border-radius: 10px;

    background: linear-gradient(
        110deg,
        var(--scbl-navy),
        var(--scbl-blue)
    );

    color: #fff;
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;

    cursor: pointer;

    box-shadow: 0 7px 17px rgba(45,76,168,.16);

    transition:
        transform .25s ease,
        box-shadow .25s ease,
        background .25s ease;
}

.scbl-submit-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(45,76,168,.27);
}

.scbl-submit-btn span:last-child {
    font-size: 21px;
    line-height: 1;
    transition: transform .25s ease;
}

.scbl-submit-btn:hover span:last-child {
    transform: translateX(5px);
}

.scbl-submit-btn:disabled {
    opacity: .65;
    cursor: wait;
}

/* ==========================================
   FORM MESSAGES
========================================== */

.scbl-form-message {
    display: none;
    margin-top: 16px;
    padding: 12px 14px;
    border-radius: 9px;

    font-size: 13px;
    line-height: 1.6;
}

.scbl-form-message.is-success {
    display: block;
    color: #146449;
    background: #e8f8f0;
}

.scbl-form-message.is-error {
    display: block;
    color: #a52e3a;
    background: #fff0f1;
}

/* ==========================================
   FOOTER
========================================== */

.scbl-form-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;

    margin-top: 16px;

    color: #8a97a7;
    text-align: center;
    font-size: 11px;
    line-height: 1.5;
}

.scbl-form-footer svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.scbl-honeypot {
    position: absolute;
    left: -9999px;
}

/* ==========================================
   MOBILE
========================================== */

@media (hover: none) {
    .scbl-opinion-fab {
        width: 195px;
    }

    .scbl-fab-text {
        width: 122px;
        max-width: 122px;
        margin-left: 11px;
        opacity: 1;
        transform: none;
    }
}

@media (max-width: 600px) {

    .scbl-opinion-fab {
        right: 16px;
        bottom: 18px;
        height: 56px;
    }

    .scbl-opinion-overlay {
        padding: 10px;
    }

    .scbl-opinion-modal {
        width: 100%;
        max-height: calc(100dvh - 20px);
        border-radius: 16px;
    }

    .scbl-opinion-header {
        padding: 24px 22px 23px;
    }

    .scbl-opinion-header h2 {
        font-size: 25px;
    }

    .scbl-opinion-header p {
        font-size: 14px;
    }

    .scbl-opinion-content {
        padding: 23px 21px 25px;
    }

    .scbl-form-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .scbl-full {
        grid-column: auto;
    }

    .scbl-upload-box {
        min-height: 116px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .scbl-opinion-fab,
    .scbl-fab-text,
    .scbl-opinion-modal,
    .scbl-opinion-overlay,
    .scbl-submit-btn,
    .scbl-submit-btn span,
    .scbl-opinion-close {
        animation: none !important;
        transition: none !important;
    }
}

/* FIX SECOND OPINION FLOATING BUTTON */

#scbl-opinion-open.scbl-opinion-fab {
    width: 64px;
    height: 64px;
    padding: 0 18px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0;
    box-sizing: border-box;
    overflow: hidden;
    white-space: nowrap;
    transition: width .4s cubic-bezier(.2,.8,.2,1),
                transform .3s ease,
                box-shadow .3s ease;
}

#scbl-opinion-open .scbl-fab-icon {
    flex: 0 0 28px;
    width: 28px;
    height: 28px;
}

#scbl-opinion-open .scbl-fab-text {
    display: inline-block;
    flex: 0 0 auto;
    width: auto;
    max-width: none;
    min-width: max-content;
    margin-left: 12px;
    overflow: visible;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0;
    line-height: 1.3;
    color: #ffffff;
    transform: translateX(-8px);
    transition: opacity .25s ease,
                transform .3s ease,
                visibility .3s ease;
}

@media (hover: hover) {
    #scbl-opinion-open.scbl-opinion-fab:hover,
    #scbl-opinion-open.scbl-opinion-fab:focus-visible {
        width: 230px;
        transform: translateY(-4px);
    }

    #scbl-opinion-open:hover .scbl-fab-text,
    #scbl-opinion-open:focus-visible .scbl-fab-text {
        opacity: 1;
        visibility: visible;
        transform: translateX(0);
    }
}

@media (hover: none) {
    #scbl-opinion-open.scbl-opinion-fab {
        width: 230px;
    }

    #scbl-opinion-open .scbl-fab-text {
        opacity: 1;
        visibility: visible;
        transform: none;
    }
}

/* SECOND OPINION BUTTON - ALWAYS SHOW TEXT */

button#scbl-opinion-open.scbl-opinion-fab {
    width: 230px !important;
    height: 62px;
    padding: 0 20px !important;
    gap: 12px;
    justify-content: center !important;
    overflow: visible !important;
    white-space: nowrap !important;
    transition: transform .3s ease, box-shadow .3s ease;
}

#scbl-opinion-open .scbl-fab-icon {
    flex: 0 0 26px;
    width: 26px;
    height: 26px;
}

#scbl-opinion-open .scbl-fab-text {
    display: inline-block !important;
    flex: 0 0 auto !important;
    width: auto !important;
    max-width: none !important;
    min-width: max-content !important;
    margin: 0 !important;
    opacity: 1 !important;
    visibility: visible !important;
    overflow: visible !important;
    transform: none !important;
    white-space: nowrap !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    color: #ffffff !important;
}

/* HOVER - ONLY ANIMATION, NO EXPANSION */

button#scbl-opinion-open.scbl-opinion-fab:hover {
    width: 230px !important;
    transform: translateY(-4px);
    box-shadow: 0 18px 38px rgba(20,42,108,.38);
}

#scbl-opinion-open:hover .scbl-fab-text {
    max-width: none !important;
    margin: 0 !important;
}

/* MOBILE */

@media (max-width: 600px) {
    button#scbl-opinion-open.scbl-opinion-fab {
        width: 210px !important;
        height: 56px;
        right: 14px !important;
        bottom: 16px !important;
        padding: 0 15px !important;
        gap: 10px;
    }

    #scbl-opinion-open .scbl-fab-text {
        font-size: 15px !important;
    }
}

