/**
 * Login-Page Styles - Basierend auf Theme style.css
 * Alle Styles für die dedizierte Login-Seite (page-login.php)
 */

/* ===== THEME RESETS FÜR LOGIN-TEMPLATE ===== */
.page-template-page-login .site-header,
.page-template-page-login header,
.page-template-page-login .hero,
.page-template-page-login .page-header,
.page-template-page-login .entry-header,
.page-template-page-login .site-footer,
.page-template-page-login .sidebar,
.page-template-page-login .site-sidebar {
    display: none !important;
}

.page-template-page-login .wrap,
.page-template-page-login .site-content,
.page-template-page-login .content-area,
.page-template-page-login .entry-content,
.page-template-page-login main {
    max-width: none !important;
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
}

.page-template-page-login .site-main {
    padding-bottom: 0 !important;
}

/* ===== LOGIN PAGE WRAPPER ===== */
.login-page-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent !important; /* Kein Verlauf: Theme-Hintergrund verwenden */
    padding: 20px;
}

.login-container {
    background-color: #ffffff;
    padding: 2em 2em 2em 18em; 
    min-height: 560px;
    background-image: url(https://wissen.alex-fischer-duesseldorf.de/wp-content/uploads/2024/02/af_register_form_bg.png);
    background-size: cover;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    width: 100%;
    max-width: 750px;
}

.login-container h1 {
    text-align: left;
    margin-bottom: 10px;
    font-family: 'Francois One', sans-serif;
    font-size: 2rem;
    color: #333;
}

/* ===== FORM GROUPS ===== */
.form-group {
    margin-bottom: 15px;
}

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

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

.form-group input:focus {
    box-shadow: 0 0 5px rgba(169, 40, 40, 0.5);
    outline: none;
    border-color: #0073aa;
}

/* ===== EMAIL & PASSWORD GROUPS MIT ICONS ===== */
.email-group,
.password-group {
    position: relative;
    display: flex;
    align-items: center;
}

.email-group input,
.password-group input {
    padding: 10px 10px 10px 35px;
}

.email-group img,
.password-group img {
    position: absolute;
    left: 5px;
    width: 20px;
    height: 20px;
    opacity: 0.6;
    transition: opacity 0.3s ease-in-out;
}

.email-group:hover img,
.password-group:hover img {
    opacity: 1;
}

/* ===== PASSWORD TOGGLE ===== */
.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;
    z-index: 10;
}

/* ===== FORM GROUP CONTAINER ===== */
.form-group-container {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.form-group-container .form-group {
    flex: 1;
    min-width: calc(50% - 1rem);
    display: flex;
    flex-direction: row;
}

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

.ssos-otp-link,
.ssos-lost-password {
    color: #0073aa;
    text-decoration: none;
    font-size: 14px;
    transition: opacity 0.3s ease;
}

.ssos-otp-link:hover:not(.disabled),
.ssos-lost-password:hover:not(.disabled) {
    text-decoration: underline;
}

.ssos-otp-link.disabled,
.ssos-lost-password.disabled {
    opacity: 0.5;
    pointer-events: none;
    cursor: not-allowed;
}

/* ===== CHECKBOX GROUP ===== */
.checkbox-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

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

.checkbox-group label {
    cursor: pointer;
    margin-bottom: 0;
}

/* ===== BUTTONS ===== */
.login-button {
    background-color: var(--primary-color, #a92828);
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 50px;
    color: #fff;
    font-family: 'Francois One', sans-serif;
    font-weight: normal;
    font-size: 1.1rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.login-button:hover {
    background-color: var(--primary-hover, #8b1f1f);
}

.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: 50px;
    font-size: 1.1rem;
    font-family: 'Francois One', sans-serif;
    font-weight: normal;
    cursor: pointer;
    transition: all 0.3s ease;
}

.button-secondary:hover:not(:disabled) {
    background-color: #e0e0e0;
    border-color: #999;
}

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

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

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

/* ===== OTP CODE BOXES (6 einzelne Felder) ===== */
.otp-code-boxes {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 20px 0;
}

.otp-box {
    width: 50px !important;
    height: 50px !important;
    padding: 10px !important;
    text-align: center !important;
    font-size: 1.5rem !important;
    font-weight: 600 !important;
    border: 2px solid #888 !important; /* Standard: grau */
    font-family: 'Francois One', sans-serif !important;
    border-radius: 8px !important;
    transition: all 0.3s ease !important;
}

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

.otp-box:not(:placeholder-shown) {
    border-color: #555 !important;
}

/* Hidden-Input für OTP-Code */
#otp-code-input {
    display: none;
}

/* ===== OTP COUNTDOWN ===== */
.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-family: 'Francois One', sans-serif;
    font-weight: normal;
    font-size: 1.4rem;
    color: #333;
}

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

.countdown-expired .countdown-progress {
    stroke: #dc3545;
}

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

/* ===== LOGIN STEPS ===== */
.login-step {
    min-height: 200px;
}

/* ===== 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;
}

/* WordPress Menü-Styles für Login Footer */
.login-footer-menu,
#menu-footer-loginformular {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex !important;
    justify-content: center;
    align-items: center;
    gap: 1em;
    flex-wrap: nowrap;
}

.login-footer-menu li,
#menu-footer-loginformular li {
    display: inline-block;
    margin: 0;
    white-space: nowrap;
}

.login-footer-menu li:not(:last-child)::after,
#menu-footer-loginformular li:not(:last-child)::after {
    content: '';
    margin: 0;
}

.login-footer-menu a,
#menu-footer-loginformular a {
    color: #888;
    text-decoration: none;
    font-size: 14px;
}

.login-footer-menu a:hover,
#menu-footer-loginformular a:hover {
    text-decoration: underline;
}

/* ===== RESEND TIMER ===== */
#resend-timer {
    margin-left: 5px;
    font-weight: 600;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 480px) {
    .login-container {
        padding: 20px;
    }
    
    .login-container h1 {
        font-size: 1.5rem;
    }
    
    .otp-box {
        width: 40px !important;
        height: 40px !important;
        font-size: 1.2rem !important;
    }
    
    .countdown-circle svg {
        width: 60px;
        height: 60px;
    }
    
    .countdown-text {
        font-size: 1rem;
    }
    
    .login-links {
        flex-direction: column;
        align-items: center;
        gap: 8px;
    }
    
    .ssos-otp-link,
    .ssos-lost-password {
        font-size: 13px;
    }
}

/* ===== SPINNER ANIMATION ===== */
.spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    vertical-align: middle;
    margin-right: 5px;
}

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

/* Success-Hinweis nach Submit */
.submit-success-hint {
    margin-top: 10px;
    padding: 10px;
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    border-radius: 4px;
    color: #155724;
    text-align: center;
    font-size: 14px;
    animation: fadeIn 0.5s ease-in;
}

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

/* ===== ALERT STYLES ===== */
.ssos-alert,
.alert {
    padding: 12px 15px;
    margin: 10px 0;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.5;
    animation: fadeIn 0.3s ease-in;
}

.ssos-alert ul,
.alert ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.ssos-alert li,
.alert li {
    margin: 0;
    padding: 2px 0;
}

/* Success Alert */
.ssos-alert-success,
.alert-success {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

/* Error Alert */
.ssos-alert-error,
.alert-error {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

/* Warning Alert */
.ssos-alert-warning,
.alert-warning {
    background-color: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
}

/* Info Alert */
.ssos-alert-info,
.alert-info {
    background-color: #d1ecf1;
    border: 1px solid #bee5eb;
    color: #0c5460;
}
