/**
 * File: public/css/credit-card-provider-handoff.css
 * Purpose: Trusted standalone styling for the credit-card provider handoff page.
 * Version: RB-PROVIDER-HANDOFF-CSS-V1.1.0-20260810
 */

:root {
    color-scheme: light;
    --rb-green-900: #073e28;
    --rb-green-800: #075c38;
    --rb-green-700: #087443;
    --rb-green-600: #0b8b50;
    --rb-green-100: #def4e7;
    --rb-green-050: #f1faf5;
    --rb-ink: #17231c;
    --rb-muted: #647068;
    --rb-border: #dce8e0;
    --rb-surface: #ffffff;
}

* {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
    margin: 0;
}

body {
    background:
        radial-gradient(circle at 50% 10%, rgba(22, 139, 79, 0.12), transparent 32rem),
        linear-gradient(180deg, #f8fbf9 0%, #eef5f1 100%);
    color: var(--rb-ink);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    -webkit-font-smoothing: antialiased;
}

.rb-handoff-page {
    display: grid;
    min-height: 100vh;
    min-height: 100svh;
    place-items: center;
    padding: 1.25rem;
}

.rb-handoff-card {
    width: min(100%, 460px);
    padding: clamp(1.55rem, 5vw, 2.45rem);
    border: 1px solid var(--rb-border);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.97);
    box-shadow: 0 24px 70px rgba(18, 65, 40, 0.12);
    text-align: center;
}

/* Real RateBuddy logo — static, uncropped, and intentionally motion-free. */
.rb-handoff-brand {
    display: inline-flex;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
    color: var(--rb-green-900);
    text-decoration: none;
}

.rb-handoff-brand-logo {
    display: block;
    width: auto;
    max-width: min(190px, 70vw);
    height: auto;
    max-height: 48px;
    object-fit: contain;
    transform: none;
    animation: none;
}

.rb-handoff-brand-fallback {
    color: var(--rb-green-900);
    font-size: 1.16rem;
    font-weight: 900;
    letter-spacing: -0.035em;
}

.rb-handoff-eyebrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.36rem;
    margin: 0 0 0.6rem;
    color: var(--rb-green-700);
    font-size: 0.69rem;
    font-weight: 850;
    letter-spacing: 0.075em;
    text-transform: uppercase;
}

.rb-handoff-eyebrow svg {
    width: 17px;
    height: 17px;
}

.rb-handoff-status h1 {
    margin: 0;
    color: var(--rb-green-900);
    font-size: clamp(1.48rem, 5vw, 1.96rem);
    font-weight: 860;
    letter-spacing: -0.035em;
    line-height: 1.18;
}

.rb-handoff-status > p:last-child {
    max-width: 350px;
    margin: 0.72rem auto 0;
    color: var(--rb-muted);
    font-size: 0.9rem;
    line-height: 1.55;
}

/* Full provider identity: logo/initials are visual; the full name is always printed. */
.rb-handoff-provider {
    display: flex;
    max-width: 360px;
    align-items: center;
    gap: 0.85rem;
    margin: 1.3rem auto 0;
    padding: 0.78rem 0.9rem;
    border: 1px solid #dfeae3;
    border-radius: 16px;
    background: linear-gradient(135deg, #fbfdfc 0%, var(--rb-green-050) 100%);
    text-align: left;
}

.rb-handoff-provider-mark {
    display: grid;
    flex: 0 0 58px;
    width: 58px;
    height: 58px;
    border: 1px solid #e2ebe5;
    border-radius: 15px;
    background: #fff;
    box-shadow: 0 7px 20px rgba(11, 91, 52, 0.08);
    place-items: center;
}

.rb-handoff-provider-logo {
    display: block;
    max-width: 44px;
    max-height: 34px;
    object-fit: contain;
}

.rb-handoff-provider-fallback {
    color: var(--rb-green-700);
    font-size: 1rem;
    font-weight: 900;
    letter-spacing: 0.02em;
}

.rb-handoff-provider-copy {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 0.08rem;
}

.rb-handoff-provider-copy > span {
    color: #708078;
    font-size: 0.65rem;
    font-weight: 730;
    letter-spacing: 0.045em;
    text-transform: uppercase;
}

.rb-handoff-provider-copy strong {
    overflow-wrap: anywhere;
    color: #173b28;
    font-size: 0.94rem;
    font-weight: 880;
    line-height: 1.25;
}

.rb-handoff-provider-copy small {
    overflow-wrap: anywhere;
    color: #68756d;
    font-size: 0.68rem;
    line-height: 1.35;
}

.rb-handoff-progress {
    position: relative;
    height: 6px;
    margin: 1.45rem 0 0.72rem;
    overflow: hidden;
    border-radius: 999px;
    background: #e5eee8;
}

.rb-handoff-progress span {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--rb-green-700), #34b972);
    transform: scaleX(0);
    transform-origin: left center;
    animation: rb-handoff-progress 1.2s cubic-bezier(0.2, 0.72, 0.24, 1) forwards;
}

@keyframes rb-handoff-progress {
    to { transform: scaleX(1); }
}

.rb-handoff-domain {
    margin: 0;
    color: #768078;
    font-size: 0.7rem;
}

.rb-handoff-continue {
    display: inline-flex;
    min-width: 148px;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    gap: 0.22rem;
    margin-top: 1rem;
    padding: 0.62rem 0.9rem;
    border: 1px solid #08673d;
    border-radius: 11px;
    background: var(--rb-green-700);
    box-shadow: 0 8px 18px rgba(8, 116, 67, 0.17);
    color: #fff;
    font-size: 0.77rem;
    font-weight: 830;
    text-decoration: none;
}

.rb-handoff-continue:hover,
.rb-handoff-continue:focus-visible {
    background: var(--rb-green-800);
    color: #fff;
}

.rb-handoff-continue:focus-visible {
    outline: 3px solid rgba(8, 116, 67, 0.22);
    outline-offset: 3px;
}

.rb-handoff-continue svg {
    width: 16px;
    height: 16px;
}

/* Enhanced trust/security badge — supported by the controller's HTTPS check. */
.rb-handoff-trust {
    display: flex;
    align-items: flex-start;
    gap: 0.78rem;
    margin-top: 1.5rem;
    padding: 0.9rem;
    border: 1px solid #bfe2ce;
    border-radius: 16px;
    background: linear-gradient(135deg, #f2fbf6 0%, #e8f7ef 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
    text-align: left;
}

.rb-handoff-trust-icon {
    display: grid;
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(255, 255, 255, 0.65);
    border-radius: 13px;
    background: linear-gradient(145deg, var(--rb-green-700), #0ca05c);
    box-shadow: 0 7px 16px rgba(8, 116, 67, 0.2);
    color: #fff;
    place-items: center;
}

.rb-handoff-trust-icon svg {
    width: 24px;
    height: 24px;
}

.rb-handoff-trust-copy {
    display: flex;
    min-width: 0;
    flex: 1;
    flex-direction: column;
    gap: 0.17rem;
}

.rb-handoff-trust-copy > strong {
    color: #173e29;
    font-size: 0.76rem;
    font-weight: 880;
    line-height: 1.3;
}

.rb-handoff-trust-copy > small {
    color: #5f7165;
    font-size: 0.66rem;
    line-height: 1.45;
}

.rb-handoff-trust-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem 0.62rem;
    margin-top: 0.28rem;
    color: var(--rb-green-800);
    font-size: 0.61rem;
    font-weight: 800;
}

.rb-handoff-leaving-note,
.rb-handoff-noscript {
    color: #737e76;
    font-size: 0.64rem;
    line-height: 1.42;
}

.rb-handoff-leaving-note {
    margin: 0.72rem 0 0;
}

.rb-handoff-noscript {
    margin: 0.85rem 0 0;
}

@media (max-width: 480px) {
    .rb-handoff-page {
        align-items: center;
        padding: 0.9rem;
    }

    .rb-handoff-card {
        padding: 1.45rem 1.1rem;
        border-radius: 20px;
    }

    .rb-handoff-provider {
        gap: 0.7rem;
        padding: 0.7rem;
    }

    .rb-handoff-provider-mark {
        flex-basis: 52px;
        width: 52px;
        height: 52px;
    }

    .rb-handoff-trust {
        gap: 0.68rem;
        padding: 0.78rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .rb-handoff-progress span {
        animation: none;
        transform: scaleX(1);
    }
}
