/* MemberPress OTP Frontend Styles - Modern Design */

/* OTP Section */
.mepr-otp-section {
    margin: 30px 0;
    padding: 0;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

/* Header */
.mepr-otp-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 24px 24px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
}

.mepr-otp-icon {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
}

.mepr-otp-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #ffffff;
    letter-spacing: -0.01em;
}

/* Instructions */
.mepr-otp-instructions {
    padding: 24px;
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
}

.mepr-otp-instructions p {
    margin: 0;
    color: #4b5563;
    line-height: 1.6;
    font-size: 14px;
}

/* Notice Box */
.mepr-otp-notice {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-top: 16px;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.5;
}

.mepr-otp-notice svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    margin-top: 2px;
}

.mepr-otp-notice-warning {
    background: #fef3c7;
    border: 1px solid #fbbf24;
    color: #92400e;
}

.mepr-otp-notice-warning svg {
    stroke: #d97706;
}

/* Form Groups */
.mepr-otp-form-group {
    padding: 24px;
    border-bottom: 1px solid #e5e7eb;
}

.mepr-otp-form-group:last-child {
    border-bottom: none;
}

/* Send Button */
.mepr-otp-send-button,
#mepr_otp_send_button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.2);
}

.mepr-otp-button-icon {
    width: 18px;
    height: 18px;
}

.mepr-otp-send-button:hover,
#mepr_otp_send_button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
}

.mepr-otp-send-button:active,
#mepr_otp_send_button:active {
    transform: translateY(0);
}

.mepr-otp-send-button:disabled,
#mepr_otp_send_button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Label */
.mepr-otp-label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
}

.mepr-required-asterisk {
    color: #ef4444;
    margin-left: 2px;
}

/* OTP Input */
.mepr-otp-input,
#mepr_otp_code {
    width: 100%;
    max-width: 280px;
    font-size: 24px;
    font-weight: 600;
    padding: 14px;
    letter-spacing: 8px;
    text-align: center;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    transition: all 0.2s ease;
    background: #ffffff;
    color: #1f2937;
}

.mepr-otp-input:focus,
#mepr_otp_code:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.mepr-otp-input::placeholder {
    color: #d1d5db;
    letter-spacing: 8px;
}

/* Hint Text */
.mepr-otp-hint {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-top: 12px;
    font-size: 13px;
    color: #6b7280;
    line-height: 1.5;
}

.mepr-otp-hint svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    margin-top: 2px;
    stroke: #9ca3af;
}

/* Status Messages */
.mepr-otp-status-msg,
#mepr_otp_status_msg {
    margin-top: 12px;
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    display: none;
}

.mepr-otp-status-msg:not(:empty),
#mepr_otp_status_msg:not(:empty) {
    display: block;
}

.mepr-otp-status-msg.success,
#mepr_otp_status_msg.success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #6ee7b7;
}

.mepr-otp-status-msg.error,
#mepr_otp_status_msg.error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.mepr-otp-status-msg.info,
#mepr_otp_status_msg.info {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #93c5fd;
}

/* Login Page OTP Styles */
.mepr-otp-login-section {
    margin: 15px 0;
    padding: 15px;
    background: #f7f7f7;
    border: 1px solid #ddd;
    border-radius: 3px;
}

.mepr-otp-login-instruction {
    margin: 0 0 10px 0;
    font-size: 13px;
    color: #666;
}

.mepr-otp-send-login-button,
#mepr_otp_send_login_button {
    background: #2271b1;
    color: #fff;
    border: 1px solid #2271b1;
    border-radius: 3px;
    padding: 8px 16px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.mepr-otp-send-login-button:hover,
#mepr_otp_send_login_button:hover {
    background: #135e96;
    border-color: #135e96;
}

.mepr-otp-send-login-button:disabled,
#mepr_otp_send_login_button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

#mepr_otp_login_code {
    margin-top: 5px;
    font-size: 14px;
    padding: 6px;
    letter-spacing: 2px;
    text-align: center;
}

.mepr-otp-login-status {
    display: inline-block;
    margin-left: 10px;
    font-size: 13px;
    font-weight: 500;
}

.mepr-otp-login-status.success {
    color: #46b450;
}

.mepr-otp-login-status.error {
    color: #dc3232;
}

.mepr-otp-login-status.info {
    color: #2271b1;
}

/* Animations */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mepr-otp-status-msg:not(:empty),
#mepr_otp_status_msg:not(:empty) {
    animation: slideIn 0.3s ease;
}

/* Loading State */
.mepr-otp-send-button.loading,
#mepr_otp_send_button.loading {
    position: relative;
    color: transparent;
}

.mepr-otp-send-button.loading::after,
#mepr_otp_send_button.loading::after {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 0.6s linear infinite;
}

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

/* Responsive Design */
@media screen and (max-width: 768px) {
    .mepr-otp-header {
        padding: 20px;
    }

    .mepr-otp-header h3 {
        font-size: 18px;
    }

    .mepr-otp-instructions,
    .mepr-otp-form-group {
        padding: 20px;
    }

    .mepr-otp-send-button,
    #mepr_otp_send_button {
        width: 100%;
    }

    .mepr-otp-input,
    #mepr_otp_code {
        max-width: 100%;
        font-size: 20px;
        letter-spacing: 6px;
    }
}

@media screen and (max-width: 480px) {
    .mepr-otp-section {
        margin: 20px 0;
        border-radius: 8px;
    }

    .mepr-otp-header {
        padding: 16px;
    }

    .mepr-otp-icon {
        width: 24px;
        height: 24px;
    }

    .mepr-otp-header h3 {
        font-size: 16px;
    }

    .mepr-otp-instructions,
    .mepr-otp-form-group {
        padding: 16px;
    }

    .mepr-otp-input,
    #mepr_otp_code {
        font-size: 18px;
        padding: 12px;
        letter-spacing: 4px;
    }

    .mepr-otp-send-button,
    #mepr_otp_send_button {
        padding: 14px 20px;
        font-size: 14px;
    }
}
