* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
    color: var(--ref-text);
    background: linear-gradient(135deg, var(--ref-primary), var(--ref-secondary));
}

.swish-referral-shell {
    display: grid;
    place-items: center;
    min-height: 100vh;
    padding: 36px 18px;
}

.swish-referral-card {
    width: min(760px, 100%);
    padding: 34px;
    border: 1px solid rgba(255, 255, 255, .28);
    border-radius: 30px;
    background: rgba(8, 17, 32, .2);
    box-shadow: 0 30px 90px rgba(0, 0, 0, .2);
    backdrop-filter: blur(22px);
}

.swish-referral-header {
    text-align: center;
}

.swish-referral-practice-logo {
    display: block;
    max-width: 170px;
    max-height: 84px;
    margin: 0 auto 20px;
    object-fit: contain;
}

.swish-referral-eyebrow {
    margin: 0 0 8px;
    font-size: 12px;
    font-weight: 400;
    letter-spacing: .12em;
    text-transform: uppercase;
    opacity: .78;
}

.swish-referral-header h1 {
    margin: 0;
    font-size: clamp(34px, 6vw, 54px);
    font-weight: 300;
    letter-spacing: -.045em;
}

.swish-referral-header > p:last-child {
    max-width: 590px;
    margin: 16px auto 0;
    font-size: 15px;
    line-height: 1.7;
    opacity: .88;
}

.swish-referral-form {
    margin-top: 30px;
    padding: 26px;
    color: #122033;
    background: rgba(255, 255, 255, .96);
    border-radius: 24px;
    box-shadow: 0 18px 46px rgba(0, 0, 0, .14);
}

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

.swish-referral-form label {
    display: grid;
    gap: 7px;
}

.swish-referral-form label > span {
    color: #526176;
    font-size: 11px;
    font-weight: 400;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.swish-referral-form input,
.swish-referral-form select {
    width: 100%;
    min-height: 48px;
    padding: 0 14px;
    color: #122033;
    background: #fff;
    border: 1px solid #dbe3ee;
    border-radius: 14px;
    font: inherit;
    outline: none;
}

.swish-referral-form input:focus,
.swish-referral-form select:focus {
    border-color: var(--ref-primary);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--ref-primary) 13%, transparent);
}

.swish-referral-other {
    grid-column: 1 / -1;
}

.swish-referral-other[hidden] {
    display: none;
}

.swish-referral-consent {
    grid-template-columns: auto 1fr !important;
    align-items: start;
    gap: 11px !important;
    margin: 20px 0;
}

.swish-referral-consent input {
    width: 18px;
    height: 18px;
    min-height: 0;
    margin: 2px 0 0;
}

.swish-referral-consent span {
    font-size: 12px !important;
    font-weight: 400 !important;
    line-height: 1.55;
    letter-spacing: 0 !important;
    text-transform: none !important;
}

.swish-referral-form button {
    width: 100%;
    min-height: 50px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: #fff;
    background: linear-gradient(135deg, var(--ref-primary), var(--ref-secondary));
    border: 0;
    border-radius: 999px;
    box-shadow: 0 14px 30px color-mix(in srgb, var(--ref-primary) 28%, transparent);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.swish-referral-form button:hover:not(:disabled) {
    transform: translateY(-1px);
}

.swish-referral-form button:disabled {
    cursor: wait;
    opacity: .88;
    transform: none;
}

.swish-referral-spinner {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    border: 2px solid rgba(255,255,255,.42);
    border-top-color: #fff;
    border-radius: 50%;
    animation: swish-referral-spin .7s linear infinite;
}

@keyframes swish-referral-spin {
    to { transform: rotate(360deg); }
}

.swish-referral-honeypot {
    position: absolute !important;
    left: -9999px !important;
}

.swish-referral-notice,
.swish-referral-success {
    margin-top: 26px;
    padding: 18px 20px;
    color: #812323;
    text-align: center;
    background: rgba(255, 255, 255, .96);
    border-radius: 18px;
}

.swish-referral-success {
    padding: 32px;
    color: #173451;
}

.swish-referral-success > span {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    margin: 0 auto 12px;
    color: #fff;
    background: linear-gradient(135deg, var(--ref-primary), var(--ref-secondary));
    border-radius: 50%;
    font-size: 22px;
    font-weight: 900;
}

.swish-referral-success h2 {
    margin: 0 0 8px;
    font-weight: 300;
}

.swish-referral-success p {
    margin: 0;
    line-height: 1.6;
}

.swish-referral-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 22px;
    font-size: 11px;
    opacity: .9;
}

.swish-referral-powered {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 5px;
    text-align: center;
}

.swish-referral-wordmark {
    color: #009dff;
    font-size: 13px;
    font-weight: 750;
    letter-spacing: .01em;
}

.swish-referral-favicon {
    width: 16px;
    height: 16px;
    object-fit: contain;
    border-radius: 4px;
}

@media (max-width: 640px) {
    .swish-referral-shell {
        padding: 18px 12px;
    }

    .swish-referral-card {
        padding: 24px 16px;
        border-radius: 24px;
    }

    .swish-referral-form {
        padding: 20px 16px;
    }

    .swish-referral-grid {
        grid-template-columns: 1fr;
    }

    .swish-referral-other {
        grid-column: auto;
    }

    .swish-referral-footer {
        text-align: center;
    }
}
