/* =====================================================================
   Status Dialog (success / failed / pending)
   Redesign concept: transactional "ticket stub" — a die-cut perforated
   edge, an icon badge that sits astride that edge, and a monospace
   status code as an eyebrow above the title. Everything else stays
   quiet so that signature reads clearly.
   ===================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;600;700&family=JetBrains+Mono:wght@500;600&display=swap');

.status-dialog-content {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    background: #ffffff;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.16), 0 2px 8px rgba(15, 23, 42, 0.06);
}

/* Top bar removed — the icon ring and button color already carry the
   status, so a second color band at the top was redundant. Kept as a
   hidden element (rather than deleted) so nothing in the markup needs
   to change. */
.status-dialog-accent {
    display: none;
}

.status-dialog-content .modal-body {
    padding: 36px 32px 30px;
    text-align: center;
}

/* ---- Icon badge -------------------------------------------------------- */
.status-icon-badge {
    position: relative;
    width: 112px;
    height: 112px;
    margin: 4px auto 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(34, 181, 115, 0.1);
    z-index: 2;
}

/* Slim solid ring, drawn with a real border — no gradient/mask trick
   to break across renderers. */
.status-icon-badge::before {
    content: "";
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    border: 2px solid var(--brand-green);
    opacity: 0.55;
}

/* "Radar ping" — a second ring that expands and fades. A standard,
   well-supported pattern (plain border + transform, no mask/composite). */
.status-icon-badge::after {
    content: "";
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    border: 2px solid var(--brand-green);
    animation: status-ping 2.4s ease-out infinite;
}

.status-lottie {
    width: 90px;
    height: 90px;
    position: relative;
    z-index: 1;
    animation: status-badge-in 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes status-ping {
    0% {
        transform: scale(1);
        opacity: 0.5;
    }
    100% {
        transform: scale(1.35);
        opacity: 0;
    }
}

@keyframes status-badge-in {
    from {
        opacity: 0;
        transform: scale(0.7);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ---- Eyebrow: monospace status code above the title ------------------ */
.status-title {
    color: var(--brand-navy);
    font-family: 'Space Grotesk', 'Segoe UI', sans-serif;
    font-weight: 700;
    font-size: 21px;
    letter-spacing: -0.01em;
    margin-bottom: 8px;
}

.status-title::before {
    content: "STATUS — UPDATE";
    display: block;
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.14em;
    color: var(--brand-muted);
    margin-bottom: 10px;
}

.status-message {
    color: var(--brand-muted);
    font-size: 14px;
    line-height: 1.55;
    margin-bottom: 0;
    max-width: 34ch;
    margin-left: auto;
    margin-right: auto;
}

/* ---- Ticket stub cut line, drawn from the message down to the buttons */
.status-message + div {
    position: relative;
    margin-top: 26px;
    padding-top: 22px;
}

.status-message + div::before {
    content: "";
    position: absolute;
    top: 0;
    left: -32px;
    right: -32px;
    border-top: 1.5px dashed var(--brand-border);
}

.status-message + div::after {
    content: "";
    position: absolute;
    top: -9px;
    left: -41px;
    right: -41px;
    height: 18px;
    background: radial-gradient(circle 9px at 0 0, transparent 9px, transparent 0) left / 18px 18px no-repeat,
    radial-gradient(circle 9px at 100% 0, transparent 9px, transparent 0) right / 18px 18px no-repeat;
    pointer-events: none;
}

/* ---- Buttons ----------------------------------------------------------- */
.status-btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    min-width: 140px;
    margin: 0 auto;
    padding: 10px 28px;
    color: #ffffff;
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.01em;
    border: none;
    border-radius: 8px;
    background-color: var(--brand-navy);
    box-shadow: 0 3px 10px rgba(11, 44, 95, 0.16);
    transition: background-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out, transform 0.1s ease-in-out;
}

.status-btn-primary:hover {
    background-color: #082047;
    box-shadow: 0 5px 14px rgba(11, 44, 95, 0.2);
    color: #ffffff;
}

.status-btn-primary:active {
    transform: translateY(1px);
}

.status-btn-primary:focus-visible {
    outline: 2px solid var(--brand-navy);
    outline-offset: 2px;
}

.status-btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    min-width: 140px;
    margin: 8px auto 0;
    padding: 9px 28px;
    color: var(--brand-navy);
    font-weight: 600;
    font-size: 14px;
    border: 1px solid var(--brand-border);
    border-radius: 8px;
    background: #ffffff;
    transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, transform 0.1s ease-in-out;
}

.status-btn-secondary:hover {
    background-color: #f8fafc;
    border-color: #c9d3e0;
    color: var(--brand-navy);
}

.status-btn-secondary:active {
    transform: translateY(1px);
}

.status-btn-secondary:focus-visible {
    outline: 2px solid var(--brand-navy);
    outline-offset: 2px;
}

/* =====================================================================
   Type-specific accents
   ===================================================================== */

/* Success (default) */
.status-dialog-success .status-btn-primary {
    background-color: var(--brand-green);
    box-shadow: 0 4px 12px rgba(34, 181, 115, 0.2);
}

.status-dialog-success .status-btn-primary:hover {
    background-color: #1a9a61;
    box-shadow: 0 6px 16px rgba(34, 181, 115, 0.24);
}

.status-dialog-success .status-icon-badge {
    background: rgba(34, 181, 115, 0.1);
}

.status-dialog-success .status-icon-badge::before,
.status-dialog-success .status-icon-badge::after {
    border-color: var(--brand-green);
}

.status-dialog-success .status-title::before {
    content: "STATUS — SUCCESSFUL";
    color: var(--brand-green);
}

/* Failed */
.status-dialog-failed .status-icon-badge {
    background: rgba(229, 72, 77, 0.1);
}

.status-dialog-failed .status-icon-badge::before,
.status-dialog-failed .status-icon-badge::after {
    border-color: var(--brand-red);
}

.status-dialog-failed .status-btn-primary {
    background-color: var(--brand-red);
    box-shadow: 0 4px 12px rgba(229, 72, 77, 0.2);
}

.status-dialog-failed .status-btn-primary:hover {
    background-color: #cf3439;
    box-shadow: 0 6px 16px rgba(229, 72, 77, 0.24);
}

.status-dialog-failed .status-title::before {
    content: "STATUS — FAILED";
    color: var(--brand-red);
}

/* A failed state is resolved, not in-progress — no ping animation */
.status-dialog-failed .status-icon-badge::after {
    animation: none;
    opacity: 0.55;
}

/* Pending */
.status-dialog-pending .status-icon-badge {
    background: rgba(245, 165, 36, 0.12);
}

.status-dialog-pending .status-icon-badge::before,
.status-dialog-pending .status-icon-badge::after {
    border-color: var(--brand-amber);
}

.status-dialog-pending .status-btn-primary {
    background-color: var(--brand-amber);
    box-shadow: 0 4px 12px rgba(245, 165, 36, 0.2);
}

.status-dialog-pending .status-btn-primary:hover {
    background-color: #dc9012;
    box-shadow: 0 6px 16px rgba(245, 165, 36, 0.24);
}

.status-dialog-pending .status-title::before {
    content: "STATUS — PENDING";
    color: var(--brand-amber);
}

/* Pending is still in progress, so the ping runs a little faster */
.status-dialog-pending .status-icon-badge::after {
    animation: status-ping 1.4s ease-out infinite;
}

/* ---- Motion & accessibility floor ------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    .status-icon-badge::after,
    .status-lottie {
        animation: none !important;
    }
}

@media (max-width: 480px) {
    .status-dialog-content .modal-body {
        padding: 36px 22px 26px;
    }

    .status-icon-badge {
        width: 108px;
        height: 108px;
    }

    .status-lottie {
        width: 88px;
        height: 88px;
    }

    .status-message + div::before,
    .status-message + div::after {
        left: -22px;
        right: -22px;
    }
}

/* =====================================================================
   Warning / Account Lock-in
   ===================================================================== */

.status-dialog-warning .status-icon-badge {
    background: rgba(245, 165, 36, 0.12);
}

.status-dialog-warning .status-icon-badge::before,
.status-dialog-warning .status-icon-badge::after {
    border-color: var(--brand-amber);
}

.status-dialog-warning .status-icon-badge::after {
    animation: status-ping 1.8s ease-out infinite;
}

.status-dialog-warning .status-btn-primary {
    background-color: var(--brand-amber);
    box-shadow: 0 4px 12px rgba(245, 165, 36, 0.22);
}

.status-dialog-warning .status-btn-primary:hover {
    background-color: #dc9012;
    box-shadow: 0 6px 16px rgba(245, 165, 36, 0.28);
}

.status-dialog-warning .status-title::before {
    content: "ACTION — WARNING";
    color: var(--brand-amber);
}


/* ---- Warning Details ----------------------------------------------- */

.status-dialog-details {
    margin: 22px 0 4px;
    padding: 0;
    border: 1px solid var(--brand-border);
    border-radius: 10px;
    overflow: hidden;
    background: #f8fafc;
    text-align: left;
}

.status-detail-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 13px 15px;
}

.status-detail-row + .status-detail-row {
    border-top: 1px solid var(--brand-border);
}

.status-detail-label {
    color: var(--brand-muted);
    font-size: 12px;
    font-weight: 500;
    line-height: 1.4;
}

.status-detail-value {
    color: var(--brand-navy);
    font-size: 13px;
    font-weight: 700;
    text-align: right;
    white-space: nowrap;
}

.status-charge-value {
    color: var(--brand-red);
}


/* ---- Warning message ----------------------------------------------- */

.status-dialog-warning .status-message {
    max-width: 40ch;
}


/* ---- Mobile -------------------------------------------------------- */

@media (max-width: 480px) {

    .status-detail-row {
        align-items: flex-start;
        flex-direction: column;
        gap: 4px;
    }

    .status-detail-value {
        text-align: left;
        white-space: normal;
    }

}

/* ---- Dialog Actions ------------------------------------------------ */

.status-dialog-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 26px;
}

.status-dialog-actions .status-btn-primary,
.status-dialog-actions .status-btn-secondary {
    width: 150px;
    min-width: 150px;
    margin: 0;
}


/* Primary button */

.status-dialog-actions .status-btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}


/* Secondary button */

.status-dialog-actions .status-btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}


/* Mobile */

@media (max-width: 480px) {

    .status-dialog-actions {
        gap: 10px;
    }

    .status-dialog-actions .status-btn-primary,
    .status-dialog-actions .status-btn-secondary {
        width: 50%;
        min-width: 0;
    }

}

