/**
 * PayIrEfb Login Form Styles
 * Based on PayEfb design system
 *
 * @version 1.0.0
 */

/* Container */
.payirefb-login-wrapper {
    max-width: 480px;
    margin: 40px auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Tahoma, sans-serif;
    direction: rtl;
    text-align: right;
}

.payirefb-login-wrapper *,
.payirefb-login-wrapper *::before,
.payirefb-login-wrapper *::after {
    box-sizing: border-box;
}

/* Login Form */
.payirefb-login-form {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    padding: 40px 30px;
}

.payirefb-header {
    text-align: center;
    margin-bottom: 30px;
}

.payirefb-header h4 {
    margin: 0 0 10px;
    font-size: 22px;
    font-weight: 700;
    color: #1a1a1a;
}

.payirefb-subtitle {
    margin: 0;
    font-size: 14px;
    color: #666;
    line-height: 1.7;
}

/* Form Elements */
.payirefb-form {
    width: 100%;
}

.payirefb-form-group {
    margin-bottom: 20px;
}

.payirefb-form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.payirefb-input {
    width: 100%;
    padding: 14px 16px;
    font-size: 16px;
    border: 2px solid #e8e8e8;
    border-radius: 8px;
    transition: all 0.3s ease;
    box-sizing: border-box;
    background: #fafafa;
}

.payirefb-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
    background: #fff;
}

.payirefb-code-input {
    text-align: center;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 12px;
    font-family: monospace;
}

.payirefb-input-error {
    border-color: #dc3232 !important;
}

/* Buttons */
.payirefb-btn {
    display: inline-block;
    width: 100%;
    padding: 14px 24px;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.payirefb-btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
}

.payirefb-btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.payirefb-btn-primary:active {
    transform: scale(0.98);
}

.payirefb-btn-primary:disabled {
    background: #ccc;
    cursor: not-allowed;
    opacity: 0.6;
    transform: none;
    box-shadow: none;
}

.payirefb-link-btn {
    background: none;
    border: none;
    color: #667eea;
    cursor: pointer;
    font-size: 13px;
    padding: 8px 12px;
    font-family: inherit;
    transition: color 0.2s;
}

.payirefb-link-btn:hover {
    color: #764ba2;
    text-decoration: underline;
}

/* Timer */
.payirefb-timer {
    font-size: 14px;
    color: #999;
    display: inline-block;
    padding: 8px 12px;
}

/* Messages */
.payirefb-message {
    display: none;
    padding: 14px 18px;
    margin-bottom: 16px;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.6;
    text-align: center;
}

.payirefb-message.payirefb-success {
    display: block;
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.payirefb-message.payirefb-error {
    display: block;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.payirefb-error {
    display: none;
    color: #dc3232;
    font-size: 13px;
    margin-top: 6px;
}

/* Loading Spinner */
.payirefb-spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: payirefb-spin 0.8s linear infinite;
    vertical-align: middle;
    margin-left: 8px;
}

@keyframes payirefb-spin {
    to { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 520px) {
    .payirefb-login-wrapper {
        padding: 12px;
        margin: 16px auto;
        max-width: 100%;
    }
    .payirefb-login-form {
        padding: 28px 18px;
        border-radius: 10px;
    }
    .payirefb-header h4 {
        font-size: 18px;
    }
    .payirefb-subtitle {
        font-size: 13px;
    }
    .payirefb-form-group label {
        font-size: 13px;
    }
    .payirefb-input {
        padding: 12px 14px;
        font-size: 15px;
    }
    .payirefb-code-input {
        font-size: 20px;
        letter-spacing: 6px;
        padding: 14px 10px;
    }
    .payirefb-btn {
        padding: 12px 20px;
        font-size: 15px;
    }
    .payirefb-message {
        font-size: 13px;
        padding: 12px 14px;
    }
}

@media (max-width: 380px) {
    .payirefb-login-form {
        padding: 22px 14px;
    }
    .payirefb-header h4 {
        font-size: 16px;
    }
    .payirefb-code-input {
        font-size: 18px;
        letter-spacing: 4px;
    }
}
