/**
 * Login-Form Styles mit OTP-Unterstützung
 */

/* ===== AUTH-METHOD SELECTOR ===== */
.auth-method-selector {
    margin: 20px 0;
}

.auth-method-option {
    display: block;
    padding: 15px;
    margin-bottom: 10px;
    border: 2px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.auth-method-option:hover {
    border-color: #0073aa;
    background-color: #f0f8ff;
}

.auth-method-option input[type="radio"] {
    margin-right: 10px;
}

.auth-method-option input[type="radio"]:checked + .method-label {
    font-weight: 600;
    color: #0073aa;
}

.method-label {
    display: flex;
    align-items: center;
    gap: 10px;
}

.method-label .dashicons {
    font-size: 20px;
}

/* ===== INFO/SUCCESS BOXES ===== */
.otp-info-box,
.otp-success-box {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 15px;
    margin: 20px 0;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.5;
}

.otp-info-box {
    background-color: #e7f3ff;
    border-left: 4px solid #0073aa;
}

.otp-success-box {
    background-color: #d4edda;
    border-left: 4px solid #28a745;
}

.otp-info-box .dashicons,
.otp-success-box .dashicons {
    font-size: 24px;
    flex-shrink: 0;
}

.otp-phishing-hint {
    font-weight: 600;
    color: #856404;
    background-color: #fff3cd;
    padding: 8px 12px;
    border-radius: 4px;
    margin-top: 8px;
}

/* ===== COUNTDOWN (PFLICHT!) ===== */
.otp-countdown-container {
    text-align: center;
    margin: 30px 0;
}

.countdown-circle {
    position: relative;
    display: inline-block;
    margin-bottom: 15px;
}

.countdown-circle svg {
    transform: rotate(-90deg);
}

.countdown-track {
    fill: none;
    stroke: #e0e0e0;
    stroke-width: 4;
}

.countdown-progress {
    fill: none;
    stroke: #0073aa;
    stroke-width: 4;
    stroke-linecap: round;
    transition: stroke-dashoffset 1s linear, stroke 0.3s ease;
}

.countdown-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 20px;
    font-weight: 700;
    color: #333;
}

.countdown-label {
    font-size: 14px;
    color: #666;
    margin: 0;
}

/* Countdown abgelaufen */
.countdown-expired .countdown-progress {
    stroke: #dc3545;
}

.countdown-expired .countdown-text {
    color: #dc3545;
}

/* ===== OTP-INPUT ===== */
.otp-input-group {
    margin: 20px 0;
}

.otp-input-wrapper {
    position: relative;
}

#otp-code-input {
    font-size: 24px;
    letter-spacing: 8px;
    text-align: center;
    font-family: 'Courier New', monospace;
    padding: 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    width: 100%;
    transition: all 0.3s ease;
}

#otp-code-input:focus {
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
    outline: none;
}

.otp-input-hint {
    display: block;
    font-size: 12px;
    color: #666;
    margin-top: 8px;
    text-align: center;
}

/* ===== OTP-ACTIONS ===== */
.otp-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

#btn-resend-code {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

#btn-resend-code:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

#resend-timer {
    margin-left: 5px;
    font-weight: 600;
}

/* ===== BACK-BUTTON ===== */
.btn-back {
    background: none;
    border: none;
    color: #0073aa;
    cursor: pointer;
    font-size: 14px;
    padding: 10px;
    text-align: center;
    width: 100%;
}

.btn-back:hover {
    text-decoration: underline;
}

/* ===== EMAIL-DISPLAY ===== */
#email-display-password,
#email-display-otp,
#email-display-verify {
    color: #0073aa;
    word-break: break-all;
}

/* ===== PASSWORD GROUP ===== */
.password-group {
    position: relative;
}

.password-group input {
    padding-right: 45px;
}

.toggle-password {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
    padding: 5px;
}

/* ===== LOGIN-LINKS ===== */
.login-links {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    gap: 10px;
}

.ssos-otp-link {
    color: #0073aa;
    text-decoration: none;
    font-size: 14px;
}

.ssos-otp-link:hover {
    text-decoration: underline;
}

.ssos-lost-password {
    color: #0073aa;
    text-decoration: none;
    font-size: 14px;
}

.ssos-lost-password:hover {
    text-decoration: underline;
}

/* ===== FORM BASICS ===== */
.login-step {
    min-height: 200px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="text"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.checkbox-group input[type="checkbox"] {
    margin: 0;
}

.login-button {
    width: 100%;
    padding: 12px;
    background-color: #0073aa;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.login-button:hover {
    background-color: #005a87;
}

.login-button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.button-secondary {
    width: 100%;
    padding: 10px;
    background-color: #f0f0f0;
    color: #333;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.button-secondary:hover {
    background-color: #e0e0e0;
}

.button-secondary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 480px) {
    #otp-code-input {
        font-size: 20px;
        letter-spacing: 6px;
    }
    
    .countdown-circle svg {
        width: 60px;
        height: 60px;
    }
    
    .countdown-text {
        font-size: 16px;
    }
    
    .login-links {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .ssos-otp-link,
    .ssos-lost-password {
        font-size: 13px;
    }
}

/* ===== LEGAL LINKS ===== */
.legal-links {
    margin: 25px 0 10px;
    text-align: center;
    font-size: 12px;
    color: #888;
}

.legal-links a {
    color: #888;
    text-decoration: none;
}

.legal-links a:hover {
    text-decoration: underline;
}

.legal-links .sep {
    margin: 0 8px;
    color: #bbb;
}

