/* FlexData Results Checker — frontend styles */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:opsz,wght@9..40,400;9..40,500;9..40,600;9..40,700;9..40,800&display=swap');

.frc-root, .frc-root * { box-sizing: border-box; }
.frc-root {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    color: #0F172A;
    max-width: 980px;
    margin: 0 auto;
    padding: 24px 0 60px;
}

/* Dark mode follows the site's own manual toggle (synced from the same
   fdhp_theme localStorage key every other page reads, via frc.js) —
   not the OS-level prefers-color-scheme, which was previously the only
   thing driving dark mode here and meant toggling the site's own
   dark/light switch had no effect on this page at all. */
.frc-root.frc-dark {
    color: #F1F5F9;
}

/* ── LOGIN PROMPT ─────────────────────────────────────────────────────── */
.frc-login-prompt {
    text-align: center;
    padding: 60px 20px;
    background: #F8FAFC;
    border-radius: 20px;
}
.frc-login-prompt p { font-size: 15px; color: #64748B; margin-bottom: 18px; }

/* ── NOTICE ───────────────────────────────────────────────────────────── */
.frc-notice {
    padding: 13px 16px;
    border-radius: 12px;
    font-size: 14px;
    margin-bottom: 18px;
}
.frc-notice-error { background: #FEF2F2; border-left: 4px solid #EF4444; color: #B91C1C; }
.frc-notice-success { background: #F0FDF4; border-left: 4px solid #22C55E; color: #15803D; }

/* ── WALLET CARD ──────────────────────────────────────────────────────── */
.frc-wallet-card {
    background: linear-gradient(145deg, #060f1e 0%, #0f2347 50%, #060f1e 100%);
    border-radius: 20px;
    padding: 26px 28px;
    color: #fff;
    margin-bottom: 24px;
    box-shadow: 0 16px 34px rgba(6, 15, 30, 0.35);
    position: relative;
    overflow: hidden;
}
.frc-wallet-card::before {
    content: '';
    position: absolute; width: 260px; height: 260px;
    top: -100px; right: -60px;
    background: radial-gradient(circle, rgba(59,91,255,.24) 0%, transparent 65%);
    pointer-events: none;
}
.frc-wallet-label {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    opacity: 0.85;
    margin-bottom: 6px;
    position: relative; z-index: 1;
}
.frc-wallet-amount {
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -0.5px;
    transition: opacity 0.2s ease;
    position: relative; z-index: 1;
}
.frc-wallet-amount.frc-updating { opacity: 0.5; }

/* ── CARDS GRID ───────────────────────────────────────────────────────── */
.frc-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 36px;
}
@media (max-width: 720px) {
    .frc-cards { grid-template-columns: 1fr; }
}

.frc-card {
    position: relative;
    background: #FFFFFF;
    border: 1px solid #E5EAF2;
    border-radius: 22px;
    padding: 26px 24px;
    box-shadow: 0 4px 18px rgba(15, 23, 42, 0.05);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    animation: frcCardIn 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.frc-dark .frc-card { background: rgba(16, 24, 43, 0.6); border-color: rgba(255,255,255,0.08); }
.frc-dark .frc-wallet-card { box-shadow: 0 16px 34px rgba(0,0,0,0.45); }
@keyframes frcCardIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }

.frc-card-icon {
    width: 52px; height: 52px;
    border-radius: 14px;
    background: rgba(59, 91, 255, 0.1);
    color: #3B5BFF;
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 14px;
}
.frc-card-icon svg { width: 26px; height: 26px; }

.frc-card-title { font-size: 17px; font-weight: 800; margin: 0 0 6px; letter-spacing: -0.2px; }
.frc-card-desc { font-size: 13.5px; color: #64748B; line-height: 1.55; margin: 0 0 16px; }

.frc-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}
.frc-price { font-size: 18px; font-weight: 800; color: #0F172A; }
.frc-dark .frc-price { color: #F1F5F9; }

.frc-status {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    padding: 4px 10px;
    border-radius: 100px;
}
.frc-status-available { background: #F0FDF4; color: #15803D; }
.frc-status-unavailable { background: #FEF2F2; color: #B91C1C; }

/* ── FORM ─────────────────────────────────────────────────────────────── */
.frc-field-label { display: block; font-size: 12.5px; font-weight: 600; color: #475569; margin-bottom: 7px; }
.frc-input {
    width: 100%;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid #E5EAF2;
    background: #fff;
    font-size: 14.5px;
    font-family: inherit;
    color: #0F172A;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.frc-input:focus { outline: none; border-color: #3B5BFF; box-shadow: 0 0 0 3px rgba(59,91,255,0.15); }
.frc-input:disabled { background: #F1F5F9; cursor: not-allowed; }
.frc-dark .frc-input { background: #0B1120; border-color: #263252; color: #F1F5F9; }
.frc-dark .frc-input:disabled { background: #131B2E; }
.frc-field-hint { display: block; font-size: 12px; margin: 6px 0 0; min-height: 15px; color: #64748B; }
.frc-field-hint.frc-hint-error { color: #EF4444; }
.frc-field-hint.frc-hint-ok { color: #22C55E; }

.frc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 13px 18px;
    margin-top: 14px;
    border-radius: 13px;
    font-size: 14.5px;
    font-weight: 700;
    font-family: inherit;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.16s ease, box-shadow 0.16s ease, opacity 0.16s ease;
}
.frc-btn:active { transform: scale(0.98); }
.frc-btn-primary {
    background: linear-gradient(135deg, #3B5BFF 0%, #7c3aed 100%);
    color: #fff;
    box-shadow: 0 10px 22px rgba(59, 91, 255, 0.3);
}
.frc-btn-primary:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 14px 26px rgba(59, 91, 255, 0.38); }
.frc-btn-primary:disabled { opacity: 0.55; cursor: not-allowed; box-shadow: none; }
.frc-btn-secondary { background: #F1F5F9; color: #334155; margin: 18px auto 0; width: auto; padding: 10px 22px; }
.frc-btn-secondary:hover { background: #E2E8F0; }
.frc-dark .frc-btn-secondary { background: rgba(255,255,255,0.08); color: #F1F5F9; }
.frc-dark .frc-btn-secondary:hover { background: rgba(255,255,255,0.14); }

.frc-spinner {
    width: 15px; height: 15px;
    border: 2px solid rgba(255,255,255,0.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: frcSpin 0.7s linear infinite;
    display: none;
}
.frc-buy-btn.frc-loading .frc-spinner { display: inline-block; }
@keyframes frcSpin { to { transform: rotate(360deg); } }

/* ── VOUCHER RESULT ───────────────────────────────────────────────────── */
.frc-voucher-result {
    margin-top: 16px;
    padding: 14px 16px;
    border-radius: 14px;
    background: #F0FDF4;
    border: 1px solid #BBF7D0;
    animation: frcCardIn 0.35s ease;
}
.frc-voucher-result.frc-vr-success { background: #F0FDF4; border-color: #BBF7D0; }
.frc-voucher-result.frc-vr-error { background: #FEF2F2; border-color: #FECACA; }

.frc-voucher-result .frc-vr-label { font-size: 11px; font-weight: 700; text-transform: uppercase; color: #15803D; margin-bottom: 6px; }
.frc-voucher-result.frc-vr-error .frc-vr-label { color: #B91C1C; }

.frc-voucher-result .frc-vr-row { display: flex; justify-content: space-between; gap: 10px; font-size: 13.5px; margin-bottom: 3px; color: #14532D; }
.frc-voucher-result.frc-vr-error .frc-vr-row { color: #7F1D1D; }
.frc-voucher-result .frc-vr-value { font-weight: 700; font-family: monospace; text-align: right; }

.frc-voucher-result .frc-vr-refund-note { font-size: 12.5px; color: #7F1D1D; margin-top: 8px; }

/* ── SMS NOTE ─────────────────────────────────────────────────────────── */
.frc-sms-note {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #64748B;
    margin: 6px 0 0;
}
.frc-sms-note svg { width: 13px; height: 13px; flex-shrink: 0; color: #94A3B8; }
.frc-dark .frc-sms-note { color: #94A3B8; }

/* ── RECENT PURCHASES ─────────────────────────────────────────────────── */
.frc-recent { margin-top: 10px; }
.frc-recent-title { font-size: 16px; font-weight: 800; margin: 0 0 16px; }
.frc-recent-table-wrap { overflow-x: auto; border: 1px solid #E5EAF2; border-radius: 16px; }
.frc-dark .frc-recent-table-wrap { border-color: rgba(255,255,255,0.08); }

.frc-recent-table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 720px; }
.frc-recent-table th {
    background: #F8FAFC;
    padding: 11px 14px;
    text-align: left;
    font-weight: 700;
    color: #475569;
    border-bottom: 1px solid #E5EAF2;
    white-space: nowrap;
}
.frc-recent-table td { padding: 11px 14px; border-bottom: 1px solid #F1F5F9; color: #1E293B; white-space: nowrap; }
.frc-recent-table tr:last-child td { border-bottom: none; }
.frc-dark .frc-recent-table th { background: rgba(255,255,255,0.04); color: #94A3B8; border-color: rgba(255,255,255,0.06); }
.frc-dark .frc-recent-table td { color: #E2E8F0; border-color: rgba(255,255,255,0.05); }

.frc-pill { display: inline-block; padding: 3px 9px; border-radius: 100px; font-size: 11px; font-weight: 700; text-transform: uppercase; }
.frc-pill-completed { background: #F0FDF4; color: #15803D; }
.frc-pill-failed { background: #FEF2F2; color: #B91C1C; }
.frc-pill-pending { background: #FFFBEB; color: #92400E; }

.frc-copy-btn {
    background: #F1F5F9;
    border: none;
    border-radius: 8px;
    padding: 5px 10px;
    font-size: 11.5px;
    font-weight: 700;
    color: #334155;
    cursor: pointer;
    font-family: inherit;
}
.frc-copy-btn:hover { background: #E2E8F0; }
.frc-copy-btn.frc-copied { background: #DCFCE7; color: #15803D; }

.frc-skeleton { height: 16px; border-radius: 8px; background: linear-gradient(90deg, #F1F5F9 25%, #E2E8F0 37%, #F1F5F9 63%); background-size: 400% 100%; animation: frcSkeleton 1.4s ease infinite; }
@keyframes frcSkeleton { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
.frc-dark .frc-skeleton { background: linear-gradient(90deg, rgba(255,255,255,0.05) 25%, rgba(255,255,255,0.1) 37%, rgba(255,255,255,0.05) 63%); background-size: 400% 100%; }

.frc-recent-empty { text-align: center; color: #94A3B8; font-size: 13.5px; padding: 30px 0; }

/* ── TOASTS ───────────────────────────────────────────────────────────── */
.frc-toast-container {
    position: fixed;
    top: 20px; left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    display: flex; flex-direction: column; gap: 10px;
    width: 92%; max-width: 380px;
    pointer-events: none;
}
.frc-toast {
    background: #fff;
    border: 1px solid #E5EAF2;
    border-left: 4px solid #3B5BFF;
    color: #0F172A;
    padding: 13px 16px;
    border-radius: 12px;
    box-shadow: 0 12px 30px rgba(15,23,42,0.15);
    font-size: 13.5px;
    animation: frcToastIn 0.3s cubic-bezier(0.16,1,0.3,1);
}
.frc-toast-error { border-left-color: #EF4444; }
.frc-toast-success { border-left-color: #22C55E; }
.frc-toast-out { animation: frcToastOut 0.25s ease forwards; }
@keyframes frcToastIn { from { opacity: 0; transform: translateY(-12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes frcToastOut { to { opacity: 0; transform: translateY(-10px); } }
.frc-dark .frc-toast { background: #10182B; border-color: rgba(255,255,255,0.08); color: #F1F5F9; }

@media (prefers-reduced-motion: reduce) {
    .frc-card, .frc-voucher-result, .frc-toast { animation: none !important; }
}
