/**
 * BMR New Auth Popup - Based on your perfect design
 * Converted from your 1.html with bmr-popup- prefixes
 */

/* Reset */
.bmr-auth-popup-overlay * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Overlay */
.bmr-auth-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    animation: bmrFadeIn 0.3s ease;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.bmr-auth-popup-overlay.bmr-show {
    opacity: 1;
    visibility: visible;
}

/* Container */
.bmr-popup-login-container,
.bmr-popup-register-container,
.bmr-popup-forgot-container {
    background: white;
    width: 100%;
    max-width: 480px;
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: bmrSlideUp 0.4s ease;
}

/* Header */
.bmr-popup-login-header,
.bmr-popup-register-header,
.bmr-popup-forgot-header {
    background: linear-gradient(135deg, #FFA500 0%, #FFD700 100%);
    padding: 28px 32px;
    text-align: center;
    position: relative;
}

.bmr-popup-login-logo,
.bmr-popup-register-logo,
.bmr-popup-forgot-logo {
    display: none;
}

.bmr-popup-login-subtitle,
.bmr-popup-register-subtitle,
.bmr-popup-forgot-subtitle {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 8px;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.bmr-popup-login-title,
.bmr-popup-register-title,
.bmr-popup-forgot-title {
    font-size: 26px;
    font-weight: 700;
    color: white;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.bmr-popup-login-close,
.bmr-popup-register-close,
.bmr-popup-forgot-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    border: none;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.bmr-popup-login-close:hover,
.bmr-popup-register-close:hover,
.bmr-popup-forgot-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

/* Form */
.bmr-popup-login-form,
.bmr-popup-register-form,
.bmr-popup-forgot-form {
    padding: 32px;
}

.bmr-popup-login-field,
.bmr-popup-register-field,
.bmr-popup-forgot-field {
    margin-bottom: 20px;
}

.bmr-popup-login-input,
.bmr-popup-register-input,
.bmr-popup-forgot-input {
    width: 100%;
    padding: 14px 16px;
    border: 1.5px solid #e0e0e0;
    border-radius: 10px;
    font-size: 15px;
    transition: all 0.3s ease;
    background: #fafafa;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica', 'Arial', sans-serif;
}

.bmr-popup-login-input:focus,
.bmr-popup-register-input:focus,
.bmr-popup-forgot-input:focus {
    outline: none;
    border-color: #FFA500;
    background: white;
    box-shadow: 0 0 0 3px rgba(255, 165, 0, 0.1);
}

/* Password field */
.bmr-popup-login-password-field,
.bmr-popup-register-password-field,
.bmr-popup-forgot-password-field {
    position: relative;
}

.bmr-popup-login-password-toggle,
.bmr-popup-register-password-toggle,
.bmr-popup-forgot-password-toggle {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

/* Checkbox */
.bmr-popup-login-checkbox-wrapper,
.bmr-popup-register-checkbox-wrapper,
.bmr-popup-forgot-checkbox-wrapper {
    display: flex;
    align-items: flex-start;
    margin: 24px 0;
}

.bmr-popup-login-checkbox-input,
.bmr-popup-register-checkbox-input,
.bmr-popup-forgot-checkbox-input {
    width: 18px;
    height: 18px;
    margin-right: 10px;
    margin-top: 2px;
    cursor: pointer;
    accent-color: #FFA500;
}

.bmr-popup-login-checkbox-label,
.bmr-popup-register-checkbox-label,
.bmr-popup-forgot-checkbox-label {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
    cursor: pointer;
}

.bmr-popup-login-checkbox-label a,
.bmr-popup-register-checkbox-label a,
.bmr-popup-forgot-checkbox-label a {
    color: #FFA500;
    text-decoration: none;
    font-weight: 500;
}

/* Options row */
.bmr-popup-login-options-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.bmr-popup-login-remember-me {
    display: flex;
    align-items: center;
}

.bmr-popup-login-remember-me input {
    width: 18px;
    height: 18px;
    margin-right: 8px;
    cursor: pointer;
    accent-color: #FFA500;
}

.bmr-popup-login-remember-me label {
    font-size: 14px;
    color: #666;
    cursor: pointer;
}

.bmr-popup-login-link,
.bmr-popup-register-link,
.bmr-popup-forgot-link {
    font-size: 14px;
    color: #FFA500;
    text-decoration: none;
    font-weight: 500;
    cursor: pointer;
}

.bmr-popup-login-link:hover,
.bmr-popup-register-link:hover,
.bmr-popup-forgot-link:hover {
    text-decoration: underline;
}

/* Submit button */
.bmr-popup-login-submit-btn,
.bmr-popup-register-submit-btn,
.bmr-popup-forgot-submit-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #FFA500 0%, #FF8C00 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.bmr-popup-login-submit-btn:hover,
.bmr-popup-register-submit-btn:hover,
.bmr-popup-forgot-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 165, 0, 0.3);
}

/* Footer */
.bmr-popup-login-footer,
.bmr-popup-register-footer,
.bmr-popup-forgot-footer {
    text-align: center;
    padding: 20px 32px 32px;
    font-size: 14px;
    color: #666;
}

.bmr-popup-login-footer a,
.bmr-popup-register-footer a,
.bmr-popup-forgot-footer a {
    color: #FFA500;
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
}

/* Description */
.bmr-popup-register-description,
.bmr-popup-forgot-description {
    padding: 24px 32px 0;
    text-align: center;
}

.bmr-popup-register-description p,
.bmr-popup-forgot-description p {
    color: #666;
    font-size: 14px;
    line-height: 1.6;
}

/* OTP Input */
.bmr-popup-register-otp-container,
.bmr-popup-forgot-otp-container {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin: 24px 0;
}

.bmr-popup-register-otp-input,
.bmr-popup-forgot-otp-input {
    width: 50px;
    height: 50px;
    text-align: center;
    font-size: 20px;
    font-weight: 600;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    transition: all 0.3s ease;
    background: #fafafa;
}

.bmr-popup-register-otp-input:focus,
.bmr-popup-forgot-otp-input:focus {
    outline: none;
    border-color: #FFA500;
    background: white;
    box-shadow: 0 0 0 3px rgba(255, 165, 0, 0.1);
}

/* Timer */
.bmr-popup-register-timer-wrapper,
.bmr-popup-forgot-timer-wrapper {
    text-align: center;
    margin: 20px 0;
    font-size: 14px;
    color: #666;
}

.bmr-popup-register-timer-text,
.bmr-popup-forgot-timer-text {
    color: #999;
}

/* Success icon */
.bmr-popup-register-success-icon,
.bmr-popup-forgot-success-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: bmrScaleIn 0.5s ease;
}

.bmr-popup-register-success-content,
.bmr-popup-forgot-success-content {
    padding: 32px;
    text-align: center;
}

.bmr-popup-register-success-title,
.bmr-popup-forgot-success-title {
    font-size: 24px;
    font-weight: 600;
    color: #333;
    margin-bottom: 12px;
}

.bmr-popup-register-success-text,
.bmr-popup-forgot-success-text {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 24px;
}

/* Step indicator */
.bmr-popup-register-step-indicator,
.bmr-popup-forgot-step-indicator {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 20px 32px 0;
}

.bmr-popup-register-step-dot,
.bmr-popup-forgot-step-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #e0e0e0;
    transition: all 0.3s ease;
}

.bmr-popup-register-step-dot.active,
.bmr-popup-forgot-step-dot.active {
    background: #FFA500;
    width: 24px;
    border-radius: 4px;
}

/* Mobile responsive */
@media (max-width: 640px) {
    .bmr-auth-popup-overlay {
        padding: 0;
        align-items: center;
    }

    .bmr-popup-login-container,
    .bmr-popup-register-container,
    .bmr-popup-forgot-container {
        max-width: 100%;
        width: 100%;
        height: 100vh;
        border-radius: 0;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .bmr-popup-login-header,
    .bmr-popup-register-header,
    .bmr-popup-forgot-header {
        padding: 20px 20px 16px;
        background: white;
        border-bottom: 1px solid #e0e0e0;
        padding-top: 80px;
    }

    .bmr-popup-login-logo,
    .bmr-popup-register-logo,
    .bmr-popup-forgot-logo {
        display: block;
        position: absolute;
        top: 20px;
        left: 50%;
        transform: translateX(-50%);
        width: 45px;
        height: 45px;
    }

    .bmr-popup-login-subtitle,
    .bmr-popup-register-subtitle,
    .bmr-popup-forgot-subtitle {
        color: #999;
        font-size: 13px;
    }

    .bmr-popup-login-title,
    .bmr-popup-register-title,
    .bmr-popup-forgot-title {
        color: #1a1a1a;
        font-size: 24px;
        text-transform: none;
        text-shadow: none;
    }

    .bmr-popup-login-close,
    .bmr-popup-register-close,
    .bmr-popup-forgot-close {
        background: transparent;
        border: 1.5px solid #e0e0e0;
        top: 25px;
        right: 20px;
        width: 36px;
        height: 36px;
    }

    .bmr-popup-login-form,
    .bmr-popup-register-form,
    .bmr-popup-forgot-form {
        padding: 20px;
        overflow-y: auto;
    }

    .bmr-popup-login-footer,
    .bmr-popup-register-footer,
    .bmr-popup-forgot-footer {
        padding: 16px 20px 24px;
    }

    .bmr-popup-register-otp-input,
    .bmr-popup-forgot-otp-input {
        width: 45px;
        height: 45px;
        font-size: 18px;
    }
}

/* Animations */
@keyframes bmrFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes bmrSlideUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bmrScaleIn {
    from {
        opacity: 0;
        transform: scale(0.5);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Utility */
.bmr-popup-hidden {
    display: none !important;
}

/* Messages */
.bmr-popup-login-messages,
.bmr-popup-register-messages,
.bmr-popup-forgot-messages {
    margin-top: 16px;
    padding: 12px;
    border-radius: 8px;
    font-size: 14px;
    display: none;
}

.bmr-popup-login-messages.success,
.bmr-popup-register-messages.success,
.bmr-popup-forgot-messages.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.bmr-popup-login-messages.error,
.bmr-popup-register-messages.error,
.bmr-popup-forgot-messages.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Field Validation States */
.bmr-popup-input.bmr-field-valid {
    border-color: #27ae60 !important;
    box-shadow: 0 0 0 2px rgba(39, 174, 96, 0.2) !important;
}

.bmr-popup-input.bmr-field-invalid {
    border-color: #e74c3c !important;
    box-shadow: 0 0 0 2px rgba(231, 76, 60, 0.2) !important;
}

.bmr-field-error {
    color: #e74c3c;
    font-size: 12px;
    margin-top: 4px;
    display: block;
    animation: bmrSlideDown 0.3s ease;
}

@keyframes bmrSlideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}