/* Robot Forooshande - Login Form & Modal - Minimal Design */

/* ===== Wrapper ===== */
.rf-login-wrapper {
    --rf-primary: #6366f1;
    --rf-secondary: #8b5cf6;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 16px;
    font-family: inherit;
    direction: rtl;
    background: #ffffff;
    color: #1e293b;
}

/* ===== Card ===== */
.rf-login-card {
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid #e5e7eb;
    padding: 40px 36px 36px;
    width: 100%;
    max-width: 420px;
    position: relative;
}

/* ===== Header ===== */
.rf-login-header {
    text-align: center;
    margin-bottom: 28px;
}
.rf-login-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 16px;
    background: var(--rf-primary);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}
.rf-login-title {
    font-size: 22px;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 6px;
    line-height: 1.4;
}
.rf-login-subtitle {
    font-size: 14px;
    color: #94a3b8;
    margin: 0;
    line-height: 1.6;
}

/* ===== Bot Info Box ===== */
.rf-login-bot-info {
    display: flex;
    gap: 12px;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 24px;
    align-items: flex-start;
}
.rf-bot-info-icon {
    flex-shrink: 0;
    color: #d97706;
    margin-top: 2px;
}
.rf-bot-info-content p {
    margin: 0;
    font-size: 13px;
    line-height: 1.7;
    color: #92400e;
}
.rf-bot-info-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #d97706;
    text-decoration: none;
    transition: color 0.2s;
}
.rf-bot-info-link:hover { color: #b45309; }

/* ===== Input Groups ===== */
.rf-input-group {
    margin-bottom: 18px;
}
.rf-input-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    margin-bottom: 8px;
}
.rf-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}
.rf-input-icon {
    position: absolute;
    right: 14px;
    color: #94a3b8;
    display: flex;
    align-items: center;
    pointer-events: none;
    transition: color 0.2s;
    z-index: 1;
}
.rf-input-wrapper input {
    width: 100%;
    padding: 13px 44px 13px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    font-size: 15px;
    font-family: inherit;
    color: #1e293b;
    background: #ffffff;
    transition: border-color 0.2s ease;
    box-sizing: border-box;
    outline: none;
}
.rf-input-wrapper input:focus {
    border-color: var(--rf-primary);
    background: #ffffff;
}
.rf-input-wrapper input:focus + .rf-input-icon,
.rf-input-wrapper:focus-within .rf-input-icon {
    color: var(--rf-primary);
}
.rf-otp-input {
    letter-spacing: 8px;
    text-align: center;
    font-size: 20px !important;
    font-weight: 600;
    padding-right: 16px !important;
}

/* ===== OTP Method Select ===== */
.rf-otp-method-select {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 18px;
}
.rf-method-option input { display: none; }
.rf-method-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 14px 10px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    cursor: pointer;
    transition: border-color 0.2s ease;
    background: #ffffff;
    font-size: 12px;
    color: #64748b;
    text-align: center;
}
.rf-method-option input:checked + .rf-method-box {
    border-color: var(--rf-primary);
    background: #ffffff;
    color: var(--rf-primary);
}
.rf-method-box:hover {
    border-color: #cbd5e1;
}
.rf-method-icon-img {
    width: 24px;
    height: 24px;
    object-fit: contain;
    border-radius: 4px;
}

/* ===== Buttons ===== */
.rf-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px 20px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: opacity 0.2s ease;
    text-decoration: none;
    text-align: center;
    border: none;
    box-sizing: border-box;
}
.rf-btn-primary {
    background: var(--rf-primary);
    color: #fff;
}
.rf-btn-primary:hover {
    opacity: 0.9;
}
.rf-btn-primary:active {
    opacity: 0.85;
}
.rf-btn-outline {
    background: #ffffff;
    color: var(--rf-primary);
    border: 1px solid #e5e7eb;
}
.rf-btn-outline:hover {
    border-color: var(--rf-primary);
    color: var(--rf-primary);
}

/* ===== Divider ===== */
.rf-login-divider {
    display: flex;
    align-items: center;
    margin: 18px 0;
}
.rf-login-divider::before,
.rf-login-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e5e7eb;
}
.rf-login-divider span {
    padding: 0 14px;
    font-size: 13px;
    color: #94a3b8;
}

/* ===== OTP Sent Badge ===== */
.rf-otp-sent-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #ecfdf5;
    color: #059669;
    border-radius: 20px;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 20px;
}

/* ===== Timer & Resend ===== */
.rf-login-timer-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-top: 16px;
}
.rf-timer-badge {
    font-size: 14px;
    font-weight: 600;
    color: var(--rf-primary);
    background: rgba(99,102,241,0.06);
    border-radius: 8px;
    padding: 4px 12px;
    font-variant-numeric: tabular-nums;
    direction: ltr;
}
.rf-resend-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    font-weight: 600;
    color: var(--rf-primary);
    text-decoration: none;
    transition: opacity 0.2s;
}
.rf-resend-link:hover { opacity: 0.7; }

/* ===== Error ===== */
.rf-login-error {
    color: #ef4444;
    font-size: 13px;
    margin-top: 12px;
    text-align: center;
    min-height: 20px;
    font-weight: 500;
}

/* ===== Loading ===== */
.rf-loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 30px 0;
}
.rf-spinner-ring {
    width: 40px;
    height: 40px;
    border: 3px solid #e5e7eb;
    border-top-color: var(--rf-primary);
    border-radius: 50%;
    animation: rf-spin 0.7s linear infinite;
}
.rf-loading-spinner p {
    font-size: 14px;
    color: #94a3b8;
    margin: 0;
}
@keyframes rf-spin {
    to { transform: rotate(360deg); }
}

/* ===== Modal Overlay (for WC replacement) ===== */
.rf-login-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.4);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.rf-login-modal-overlay .rf-login-card {
    animation: rf-modal-in 0.25s ease;
}
@keyframes rf-modal-in {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}
.rf-login-close {
    position: absolute;
    top: 14px;
    left: 14px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 18px;
    cursor: pointer;
    color: #64748b;
    transition: border-color 0.2s;
    line-height: 1;
    z-index: 1;
}
.rf-login-close:hover {
    border-color: #cbd5e1;
    color: #1e293b;
}

/* ===== Responsive ===== */
@media (max-width: 480px) {
    .rf-login-wrapper { padding: 20px 12px; }
    .rf-login-card { padding: 32px 24px 28px; border-radius: 14px; }
    .rf-login-title { font-size: 19px; }
    .rf-login-icon { width: 48px; height: 48px; border-radius: 12px; }
    .rf-otp-method-select { grid-template-columns: 1fr; }
}

/* ===== Dark mode ===== */
@media (prefers-color-scheme: dark) {
    .rf-login-card {
        background: #1e293b;
        border-color: #334155;
    }
    .rf-login-title { color: #f1f5f9; }
    .rf-login-subtitle { color: #64748b; }
    .rf-input-label { color: #94a3b8; }
    .rf-input-wrapper input {
        background: #0f172a;
        border-color: #334155;
        color: #f1f5f9;
    }
    .rf-input-wrapper input:focus {
        background: #1e293b;
        border-color: var(--rf-primary);
    }
    .rf-method-box {
        background: #0f172a;
        border-color: #334155;
        color: #94a3b8;
    }
    .rf-method-option input:checked + .rf-method-box {
        background: rgba(99,102,241,0.08);
    }
    .rf-btn-outline {
        border-color: #334155;
        color: var(--rf-secondary);
        background: #0f172a;
    }
    .rf-btn-outline:hover { border-color: var(--rf-primary); }
    .rf-login-divider::before,
    .rf-login-divider::after { background: #334155; }
    .rf-login-divider span { color: #64748b; }
    .rf-login-bot-info {
        background: rgba(251,191,36,0.08);
        border-color: rgba(251,191,36,0.25);
    }
    .rf-bot-info-content p { color: #fbbf24; }
    .rf-login-close {
        background: #1e293b;
        border-color: #334155;
        color: #94a3b8;
    }
    .rf-login-close:hover { border-color: #475569; color: #f1f5f9; }
    .rf-login-modal-overlay { background: rgba(0,0,0,0.6); }
}
