/* BBC CRM OTP — Inline Form Style v3.0 */

.efwm-otp-section {
    margin: 6px 0 14px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ── Send row ─────────────────────────────────────────────── */

.efwm-send-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.efwm-phone-hint {
    font-size: 12px;
    color: #555;
}

.efwm-send-otp-btn {
    display: inline-block;
    padding: 10px 18px;
    background: #25D366;
    color: #fff !important;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, opacity 0.2s;
    letter-spacing: 0.2px;
    line-height: 1.4;
}

.efwm-send-otp-btn:hover:not(:disabled) {
    background: #1ebe5d;
}

.efwm-send-otp-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ── Verify row ──────────────────────────────────────────── */

.efwm-verify-row {
    display: none;
    margin-top: 10px;
}

.efwm-digit-row {
    display: flex;
    gap: 6px;
    margin-bottom: 10px;
}

.efwm-digit {
    width: 40px !important;
    height: 48px !important;
    text-align: center !important;
    font-size: 20px !important;
    font-weight: 700 !important;
    border: 2px solid #ddd !important;
    border-radius: 8px !important;
    outline: none !important;
    transition: border-color 0.15s, box-shadow 0.15s !important;
    background: #fafafa !important;
    color: #111 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    flex: none !important;
}

.efwm-digit:focus {
    border-color: #25D366 !important;
    background: #fff !important;
    box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.18) !important;
}

.efwm-otp-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.efwm-verify-otp-btn {
    padding: 10px 18px;
    background: #25D366;
    color: #fff !important;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, opacity 0.2s;
}

.efwm-verify-otp-btn:hover:not(:disabled) {
    background: #1ebe5d;
}

.efwm-verify-otp-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.efwm-resend-otp-btn {
    padding: 9px 14px;
    background: transparent;
    border: 1.5px solid #ddd;
    border-radius: 8px;
    font-size: 12px;
    color: #555;
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s;
}

.efwm-resend-otp-btn:hover:not(:disabled) {
    border-color: #25D366;
    color: #25D366;
}

.efwm-resend-otp-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ── Messages ────────────────────────────────────────────── */

.efwm-otp-msg {
    display: none;
    font-size: 12px;
    margin-top: 8px;
    padding: 6px 10px;
    border-radius: 6px;
    line-height: 1.4;
}

.efwm-msg-error {
    background: #fff0f0;
    color: #c0392b;
}

.efwm-msg-success {
    background: #f0fff4;
    color: #1a9c4a;
}

.efwm-msg-info {
    background: #f0f4ff;
    color: #2563eb;
}

/* ── Verified badge ──────────────────────────────────────── */

.efwm-otp-verified-badge {
    display: none;
    padding: 8px 12px;
    background: #f0fff4;
    color: #1a9c4a;
    font-size: 13px;
    font-weight: 600;
    border-radius: 8px;
    border: 1.5px solid #25D366;
    margin-top: 4px;
}

/* ── Shake animation (submit without verifying) ──────────── */

@keyframes efwm-shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-6px); }
    40%, 80% { transform: translateX(6px); }
}

.efwm-shake {
    animation: efwm-shake 0.5s ease;
}

/* ── Mobile ──────────────────────────────────────────────── */

@media (max-width: 480px) {
    .efwm-digit {
        width: 34px !important;
        height: 42px !important;
        font-size: 17px !important;
    }

    .efwm-digit-row {
        gap: 4px;
    }
}
