/**
 * Guard Dog 2FA Login Form Styles
 *
 * @package GuardDog
 * @since 1.8.0
 */

/* Section visibility */
.guard-dog-2fa-email-status {
    display: none;
}

.guard-dog-2fa-code-section {
    display: none;
}

/* Main 2FA container */
#guard-dog-2fa-login-container {
    margin-bottom: 20px;
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
}

.guard-dog-2fa-method-label {
    margin-bottom: 20px;
}

/* Hide all forms by default */
#loginform,
#recoveryform,
#emailform {
    display: none !important;
}

/* Show forms when they have the 'show' class */
#loginform.show,
#recoveryform.show,
#emailform.show {
    display: block !important;
}

/* Hide code section by default when both methods are available */
.guard-dog-2fa-code-section {
    display: none;
}

/* Show code section when method is selected */
.guard-dog-2fa-code-section.show {
    display: block !important;
}

/* Email status section */
.guard-dog-2fa-email-status {
    margin: 10px 0;
    text-align: center;
}

/* 2FA method selector */
.guard-dog-2fa-method-selector {
    margin-bottom: 15px !important;
}

.guard-dog-2fa-method-label {
    margin: 0 0 10px 0;
    font-weight: 600;
    color: #333;
}

.guard-dog-2fa-method-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.guard-dog-2fa-method-option {
    display: flex !important;
    align-items: center;
    padding: 8px 12px !important;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
    transition: all 0.2s ease;
}

.guard-dog-2fa-method-option:hover {
    border-color: #0073aa;
    background: #f0f8ff;
}

.guard-dog-2fa-method-option input[type="radio"] {
    margin-right: 8px;
}

.guard-dog-2fa-method-text {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.guard-dog-2fa-method-text .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

/* Toggle links */
.guard-dog-2fa-toggle-links {
    text-align: center;
    margin-top: 50px;
}

.guard-dog-2fa-link {
    color: #0073aa;
    text-decoration: none;
    font-size: 13px;
    padding: 5px 10px;
    border-radius: 3px;
    transition: all 0.2s ease;
}

.guard-dog-2fa-link:hover {
    color: #005a87;
    text-decoration: underline;
    background: #f0f8ff;
}

.guard-dog-2fa-link-disabled {
    color: #999;
    font-size: 13px;
    cursor: not-allowed;
}

/* Recovery code info */
.guard-dog-2fa-recovery-info {
    text-align: center;
    margin-top: 10px;
    color: #666;
    font-size: 12px;
    line-height: 1.4;
    display: none;
}

.guard-dog-2fa-recovery-info.show {
    display: block;
}

.guard-dog-2fa-recovery-info small {
    font-size: 11px;
}

/* Email 2FA section */
.guard-dog-email-2fa-section {
    margin-top: 15px;
    padding: 15px;
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.guard-dog-2fa-email-status > p {
    margin: 15px 0;
    padding: 10px;
    border-radius: 4px;
}

.guard-dog-2fa-email-status .guard-dog-2fa-sending {
    background-color: rgba(0, 45, 128, 0.1);
    color: #3a4457;
}

.guard-dog-2fa-email-status .guard-dog-2fa-success {
    background-color: rgba(0, 128, 3, 0.1);
    color: #3a573f;
}

.guard-dog-2fa-email-status .guard-dog-2fa-error {
    background-color: rgba(208, 0, 0, 0.1);
    color: #573a3a;
}

.guard-dog-email-2fa-send-code {
    margin-top: 10px;
}

.guard-dog-email-code-status {
    margin-left: 10px;
    font-size: 12px;
    font-style: italic;
}

/* Form styling enhancements */
#guard-dog-2fa-login-container input[type="text"] {
    width: 100%;
    box-sizing: border-box;
}

#guard-dog-2fa-login-container .submit {
    margin-top: 20px;
}

#guard-dog-2fa-login-container .button {
    width: 100%;
    padding: 8px 16px;
    font-size: 16px;
    line-height: 1.4;
    height: 40px !important;
}

/* Error message styling */
#guard-dog-2fa-login-container .error-message {
    background: #dc3232;
    color: #fff;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 15px;
}

#guard-dog-2fa-login-container .error-message strong {
    color: #fff;
}

/* Success message styling */
#guard-dog-2fa-login-container .message {
    background: #46b450;
    color: #fff;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 15px;
}

/* Status message classes for JavaScript */
.guard-dog-2fa-sending {
    color: #0073aa;
    margin: 10px 0;
}

.guard-dog-2fa-success {
    color: #28a745;
    margin: 10px 0;
}

.guard-dog-2fa-error {
    color: #dc3545;
    margin: 10px 0;
}

#backtologin {
    font-size: 13px;
    padding: 0 24px;
    margin: 16px 0;
    word-wrap: break-word;
}

#backtologin a {
    text-decoration: none;
    color: #50575e;
}

/* Responsive design */
@media (max-width: 480px) {
    #guard-dog-2fa-login-container {
        max-width: 100%;
        margin: 0 10px;
    }
    
    .guard-dog-2fa-method-options {
        gap: 8px;
    }
    
    .guard-dog-2fa-method-option {
        padding: 6px 10px;
    }
} 