@import url('https://fonts.googleapis.com/css2?family=Sora:wght@300;400;600;700&family=DM+Sans:wght@400;500;600&display=swap');

:root {
    --iboact-bg:         #ffffff;
    --iboact-card:       #ffffff;
    --iboact-card-inner: #f7f8fc;
    --iboact-border:     #e4e7f0;
    --iboact-accent:     #AD1524;
    --iboact-accent-h:   #8B1020;
    --iboact-accent2:    #D91E2A;
    --iboact-text:       #1a1f3c;
    --iboact-muted:      #363940;
    --iboact-muted-lt:   #050404;
    --iboact-success:    #10b981;
    --iboact-error:      #ef4444;
    --iboact-radius:     12px;
    --iboact-shadow:     0 4px 24px rgba(0,0,0,0.07), 0 1px 3px rgba(0,0,0,0.05);
}

.iboact-wrapper {
    font-family: 'Sora', sans-serif;
    border-radius: 20px;
    max-width: 520px;
    margin: 40px auto;
    padding: 44px 40px;
    color: var(--iboact-text);
    position: relative;
    overflow: hidden;
}

.iboact-wrapper::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--iboact-accent), var(--iboact-accent2));
    border-radius: 20px 20px 0 0;
}

/* Progress */
.iboact-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 36px;
}

.iboact-progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    opacity: 0.38;
    transition: opacity 0.3s;
}

.iboact-progress-step.active,
.iboact-progress-step.done { opacity: 1; }

.step-number {
    width: 38px; height: 38px;
    border-radius: 50%;
    background: #f3f4f6;
    border: 2px solid var(--iboact-border);
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 14px; color: var(--iboact-muted-lt);
    transition: all 0.3s;
}

.iboact-progress-step.active .step-number {
    background: var(--iboact-accent);
    border-color: var(--iboact-accent);
    color: #fff;
    box-shadow: 0 0 0 4px rgba(173,21,36,0.15);
}

.iboact-progress-step.done .step-number {
    background: var(--iboact-success);
    border-color: var(--iboact-success);
    color: #fff;
}

.step-label {
    font-size: 11px; color: var(--iboact-muted-lt);
    white-space: nowrap; letter-spacing: 0.03em;
}

.iboact-progress-step.active .step-label {
    color: var(--iboact-accent);
    font-weight: 700;
}

.iboact-progress-step.done .step-label {
    color: var(--iboact-success);
}

.iboact-progress-line {
    flex: 1; height: 2px;
    background: var(--iboact-border);
    margin: 0 10px; margin-bottom: 22px;
    max-width: 60px; border-radius: 2px;
}

/* Step title */
.iboact-step-title {
    font-size: 21px; font-weight: 700;
    margin: 0 0 24px; color: var(--iboact-text);
    padding-bottom: 12px;
    border-bottom: 2px solid #f3f4f6;
}

/* Form groups */
.iboact-form-group { margin-bottom: 20px; }

.iboact-form-group label {
    display: block; font-size: 11px; font-weight: 700;
    color: var(--iboact-muted); margin-bottom: 8px;
    letter-spacing: 0.08em; text-transform: uppercase;
}

.required { color: var(--iboact-accent); }

.iboact-form-group input[type="text"],
.iboact-form-group input[type="email"],
.iboact-form-group input[type="tel"] {
    width: 100%;
    background: var(--iboact-card-inner);
    border: 1.5px solid var(--iboact-border);
    border-radius: var(--iboact-radius);
    padding: 13px 16px;
    color: var(--iboact-text);
    font-family: 'Sora', sans-serif;
    font-size: 15px;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.iboact-form-group input:focus {
    outline: none;
    border-color: var(--iboact-accent);
    box-shadow: 0 0 0 3px rgba(173,21,36,0.1);
    background: #fff;
}

.iboact-form-group input::placeholder { color: #c4c9d9; }

.iboact-error {
    display: block; color: var(--iboact-error);
    font-size: 12px; margin-top: 6px; min-height: 16px;
}

/* ── MAC field with help button ──────────────────────────────────────────── */
.iboact-mac-wrap {
    display: flex;
    gap: 8px;
    align-items: center;
}

.iboact-mac-wrap input {
    flex: 1;
    min-width: 0;
    width: auto !important; /* override base width:100% so flex works */
}

.iboact-mac-help-btn {
    flex-shrink: 0;
    align-self: center;
    width: 36px; height: 36px;
    border-radius: 50%;
    border: 1.5px solid var(--iboact-border);
    background: var(--iboact-card-inner);
    color: var(--iboact-muted);
    font-size: 14px; font-weight: 700;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.2s;
    padding: 0;
    line-height: 1;
}

.iboact-mac-help-btn:hover {
    background: var(--iboact-accent);
    color: #fff;
    border-color: var(--iboact-accent);
}

/* MAC help panel */
.iboact-mac-help {
    background: #f0f7ff;
    border: 1.5px solid #bfdbfe;
    border-radius: var(--iboact-radius);
    padding: 14px 16px;
    margin-top: 10px;
    font-size: 13px;
    line-height: 1.7;
    color: #1e40af;
}

.iboact-mac-help p { margin: 0 0 6px; }
.iboact-mac-help p:last-child { margin-bottom: 0; }

/* ── Duplicate MAC warning ───────────────────────────────────────────────── */
.iboact-duplicate-warn {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    background: #fff7ed;
    border: 1.5px solid #fed7aa;
    border-radius: var(--iboact-radius);
    padding: 14px 16px;
    margin-top: 12px;
    font-size: 13px;
    color: #92400e;
    line-height: 1.6;
}

.iboact-duplicate-warn > span { font-size: 20px; flex-shrink: 0; }
.iboact-duplicate-warn strong { display: block; margin-bottom: 4px; }
.iboact-duplicate-warn p { margin: 0; }
.iboact-duplicate-warn a { color: var(--iboact-accent); font-weight: 600; }

/* Buttons */
.iboact-btn-row {
    display: flex; gap: 12px; margin-top: 28px; justify-content: flex-end;
}

.iboact-btn {
    padding: 13px 28px;
    border-radius: var(--iboact-radius);
    font-family: 'Sora', sans-serif;
    font-weight: 700; font-size: 15px;
    cursor: pointer; border: none;
    transition: all 0.2s; letter-spacing: 0.02em;
}

.iboact-btn-primary {
    background: linear-gradient(135deg, var(--iboact-accent), var(--iboact-accent2));
    color: #fff;
    box-shadow: 0 4px 16px rgba(173,21,36,0.3);
}

.iboact-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 22px rgba(173,21,36,0.45);
}

.iboact-btn-primary:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
}

.iboact-btn-secondary {
    background: #f3f4f6;
    color: var(--iboact-muted);
    border: 1px solid var(--iboact-border);
}

.iboact-btn-secondary:hover {
    background: #e9ebf0;
    color: var(--iboact-text);
}

/* Payment */
.iboact-amount-box {
    background: linear-gradient(135deg, #fff5f5, #ffe8e8);
    border: 1.5px solid rgba(173,21,36,0.2);
    border-radius: var(--iboact-radius);
    padding: 20px 24px;
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 24px;
}

.iboact-amount-label { font-size: 14px; color: var(--iboact-muted); font-weight: 600; }
.iboact-amount-value { font-size: 32px; font-weight: 700; color: var(--iboact-accent2); }

.iboact-payment-btn-wrap { text-align: center; margin-bottom: 28px; }

.iboact-btn-payment {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: #FFC439;
    color: #003087;
    padding: 14px 36px;
    border-radius: 50px;
    text-decoration: none;
    font-family: 'Sora', sans-serif;
    font-weight: 700; font-size: 16px;
    box-shadow: 0 4px 20px rgba(255,196,57,0.45), 0 2px 6px rgba(0,0,0,0.1);
    transition: all 0.25s;
    border: none;
}

.iboact-btn-payment:hover {
    transform: translateY(-2px);
    background: #f0b429;
    box-shadow: 0 8px 28px rgba(255,196,57,0.55), 0 3px 8px rgba(0,0,0,0.12);
    color: #003087;
    text-decoration: none;
}

.iboact-payment-hint { font-size: 12px; color: var(--iboact-muted-lt); margin-top: 10px; }

/* File upload */
.iboact-file-drop {
    position: relative;
    border: 2px dashed var(--iboact-border);
    border-radius: var(--iboact-radius);
    padding: 28px; text-align: center;
    cursor: pointer; transition: all 0.2s;
    background: var(--iboact-card-inner);
}

.iboact-file-drop:hover,
.iboact-file-drop.dragover {
    border-color: var(--iboact-accent);
    background: #fff5f5;
}

.iboact-file-drop input[type="file"] {
    position: absolute; inset: 0; opacity: 0;
    cursor: pointer; width: 100%; height: 100%;
}

.iboact-file-label {
    display: flex; flex-direction: column;
    align-items: center; gap: 8px; pointer-events: none;
}

.iboact-file-icon { font-size: 28px; }
.iboact-file-name { font-size: 14px; color: var(--iboact-muted); }

.iboact-file-hint {
    display: block;
    font-size: 11px;
    color: #9ca3af;
    margin-top: 8px;
    text-align: center;
}

/* ── Image preview ───────────────────────────────────────────────────────── */
.iboact-preview-wrap {
    margin-top: 12px;
    border: 1.5px solid var(--iboact-success);
    border-radius: var(--iboact-radius);
    overflow: hidden;
    position: relative;
    background: #f0fdf4;
}

.iboact-preview-img {
    width: 100%;
    max-height: 200px;
    object-fit: contain;
    display: block;
    padding: 8px;
    box-sizing: border-box;
}

.iboact-preview-remove {
    display: block;
    width: 100%;
    background: #fee2e2;
    border: none;
    border-top: 1px solid #fca5a5;
    color: #b91c1c;
    font-size: 13px;
    font-weight: 600;
    padding: 8px;
    cursor: pointer;
    transition: background 0.2s;
    font-family: 'Sora', sans-serif;
}

.iboact-preview-remove:hover { background: #fecaca; }

/* Summary */
.iboact-summary {
    background: var(--iboact-card-inner);
    border: 1px solid var(--iboact-border);
    border-radius: var(--iboact-radius);
    padding: 20px; margin-bottom: 4px;
}

.iboact-summary-row {
    display: flex; justify-content: space-between;
    padding: 9px 0;
    border-bottom: 1px solid var(--iboact-border);
    font-size: 14px;
}

.iboact-summary-row:last-child { border-bottom: none; }
.iboact-summary-row span:first-child { color: var(--iboact-muted); }
.iboact-summary-row span:last-child  { font-weight: 600; color: var(--iboact-text); }

/* Waiting / Success */
.iboact-waiting,
.iboact-success { text-align: center; padding: 20px 0; }

.iboact-spinner {
    width: 60px; height: 60px;
    border: 3px solid var(--iboact-border);
    border-top-color: var(--iboact-accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 24px;
}

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

.iboact-countdown {
    font-size: 52px; font-weight: 700;
    color: var(--iboact-accent2);
    letter-spacing: 0.05em; margin-top: 16px;
}

.iboact-waiting-text,
.iboact-success-text { color: var(--iboact-muted); font-size: 15px; margin-top: 8px; line-height: 1.6; }

.iboact-success-icon {
    width: 76px; height: 76px;
    background: linear-gradient(135deg, var(--iboact-success), #059669);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 34px; color: #fff;
    margin: 0 auto 24px;
    animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 0 0 8px rgba(16,185,129,0.12);
}

@keyframes popIn {
    0%   { transform: scale(0); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.iboact-resend-msg {
    font-size: 13px;
    color: var(--iboact-success);
    margin-top: 8px;
}

/* ── Key field ───────────────────────────────────────────────────────────── */
.iboact-key-wrap {
    display: flex;
    gap: 8px;
    align-items: center;
}

.iboact-key-wrap input[type="text"] {
    flex: 1;
    min-width: 0;
    width: auto !important; /* override base width:100% so flex works */
    background: var(--iboact-card-inner);
    border: 1.5px solid var(--iboact-border);
    border-radius: var(--iboact-radius);
    padding: 13px 16px;
    color: var(--iboact-text);
    font-family: 'Sora', sans-serif;
    font-size: 15px;
    font-weight: 400;
    letter-spacing: 0.15em;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.iboact-key-wrap input[type="text"]:focus {
    outline: none;
    border-color: var(--iboact-accent);
    box-shadow: 0 0 0 3px rgba(173,21,36,0.1);
    background: #fff;
}

.iboact-key-wrap input[type="text"]::placeholder {
    color: #c4c9d9;
    font-weight: 400;
    letter-spacing: 0.25em;
}

.iboact-key-help-btn {
    flex-shrink: 0;
    align-self: center;
    width: 36px; height: 36px;
    border-radius: 50%;
    border: 1.5px solid var(--iboact-border);
    background: var(--iboact-card-inner);
    color: var(--iboact-muted);
    font-size: 14px; font-weight: 700;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.2s;
    padding: 0;
    line-height: 1;
}

.iboact-key-help-btn:hover {
    background: var(--iboact-accent);
    color: #fff;
    border-color: var(--iboact-accent);
}

/* Help panel */
.iboact-key-help {
    background: #f0f7ff;
    border: 1.5px solid #bfdbfe;
    border-radius: var(--iboact-radius);
    padding: 14px 16px;
    margin-top: 10px;
    font-size: 13px;
    line-height: 1.7;
    color: #1e40af;
}

.iboact-key-help p { margin: 0 0 6px; }
.iboact-key-help p:last-child { margin-bottom: 0; }

.iboact-key-hint {
    display: block;
    font-size: 11px;
    color: #9ca3af;
    margin-top: 6px;
    font-style: italic;
}

.iboact-key-display {
    font-family: 'Courier New', monospace;
    font-size: 16px;
    font-weight: 900;
    background: #fff3cd;
    color: #856404;
    padding: 2px 10px;
    border-radius: 5px;
    letter-spacing: 3px;
}

.iboact-amount-badge {
    display: inline-block;
    background: linear-gradient(135deg, #AD1524, #D91E2A);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 20px;
    margin-left: 8px;
    letter-spacing: 0.05em;
    vertical-align: middle;
    text-transform: uppercase;
}

/* Responsive */
@media (max-width: 560px) {
    .iboact-wrapper { padding: 28px 18px; margin: 20px 12px; }
    .iboact-amount-value  { font-size: 26px; }
    .iboact-step-title    { font-size: 18px; }
    .iboact-mac-wrap { flex-wrap: wrap; }
    .iboact-mac-wrap input { flex: 1 1 100%; }
}

/* ══════════════════════════════════════════════════════════════════════════
   WhatsApp Button
   ══════════════════════════════════════════════════════════════════════════ */
.wa-btn-wrap {
    margin: 36px 0 0;
    padding-top: 28px;
    border-top: 1.5px dashed #e4e7f0;
    position: relative;
}

.wa-btn-wrap::before {
    content: '— Need help? —';
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: #fff;
    padding: 0 12px;
    font-family: 'Sora', sans-serif;
    font-size: 10px;
    font-weight: 600;
    color: #b0b8c8;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    white-space: nowrap;
}

.wa-button {
    display: flex;
    align-items: center;
    width: 100%;
    text-decoration: none;
    border-radius: 14px;
    background: #f0fdf4;
    border: 1.5px solid #bbf7d0;
    box-shadow: 0 2px 12px rgba(37,211,102,0.1);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
    overflow: hidden;
    box-sizing: border-box;
    gap: 0;
}

.wa-button:hover {
    transform: translateY(-2px);
    border-color: #4ade80;
    box-shadow: 0 6px 24px rgba(37,211,102,0.18);
    text-decoration: none;
}

/* ── Icon ── */
.wa-icon-col {
    flex-shrink: 0;
    width: 64px;
    align-self: stretch;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #dcfce7;
    border-right: 1px solid #bbf7d0;
}

.wa-icon-ring {
    width: 42px; height: 42px;
    border-radius: 50%;
    background: #25d366;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(37,211,102,0.35);
    animation: wa-icon-pulse 2.5s ease-in-out infinite;
    flex-shrink: 0;
}

@keyframes wa-icon-pulse {
    0%, 100% { box-shadow: 0 2px 10px rgba(37,211,102,0.3); }
    50%       { box-shadow: 0 2px 18px rgba(37,211,102,0.5); }
}

.wa-icon-bg {
    display: flex;
    align-items: center;
    justify-content: center;
}

.wa-icon-bg svg {
    width: 24px; height: 24px;
    fill: #fff;
    display: block;
}

/* ── Text ── */
.wa-text-col {
    flex: 1;
    min-width: 0;
    padding: 13px 14px;
}

.wa-label {
    font-family: 'Sora', sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: #14532d;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wa-desc {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 2px;
    font-family: 'Sora', sans-serif;
    font-size: 11.5px;
    color: #6b7280;
    font-weight: 400;
    white-space: nowrap;
    overflow: hidden;
}

.wa-online-dot {
    width: 6px; height: 6px;
    background: #22c55e;
    border-radius: 50%;
    flex-shrink: 0;
    animation: wa-dot-blink 2s ease-in-out infinite;
}

@keyframes wa-dot-blink {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.3; }
}

/* ── CTA ── */
.wa-cta-col {
    flex-shrink: 0;
    padding: 0 14px 0 8px;
    display: flex;
    align-items: center;
}

.wa-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #16a34a;
    color: #fff;
    font-family: 'Sora', sans-serif;
    font-size: 12px;
    font-weight: 700;
    padding: 8px 14px;
    border-radius: 8px;
    white-space: nowrap;
    letter-spacing: 0.02em;
    transition: background 0.18s ease;
    box-shadow: 0 2px 8px rgba(22,163,74,0.3);
}

.wa-button:hover .wa-cta-btn {
    background: #15803d;
}

/* ── Mobile ── */
@media (max-width: 480px) {
    .wa-icon-col  { width: 54px; }
    .wa-icon-ring { width: 36px; height: 36px; }
    .wa-icon-bg svg { width: 20px; height: 20px; }
    .wa-text-col  { padding: 11px 10px; }
    .wa-label     { font-size: 13px; }
    .wa-desc      { font-size: 11px; }
    .wa-cta-col   { padding: 0 10px 0 6px; }
    .wa-cta-btn   { font-size: 11px; padding: 7px 11px; }
}

@media (max-width: 360px) {
    .wa-icon-col  { width: 48px; }
    .wa-label     { font-size: 12px; }
    .wa-cta-btn   { font-size: 10px; padding: 6px 9px; }
}
