/**
 * Chess Academy – Auth Modal Styles (Login / Register)
 * @copyright  (C) 2026 WarumSchach Verlag
 */

/* Overlay */
.academy-auth-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(3px);
}

/* Card */
.academy-auth-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
    width: 90vw;
    max-width: 400px;
    overflow: hidden;
}

/* Header with tabs */
.academy-auth-header {
    display: flex;
    align-items: stretch;
    background: #f8f7fc;
    border-bottom: 1px solid #e5e5e5;
    position: relative;
}

.academy-auth-tab {
    flex: 1;
    padding: 14px 16px;
    border: none;
    background: none;
    font-weight: 600;
    font-size: 15px;
    color: #888;
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s;
    border-bottom: 3px solid transparent;
}

.academy-auth-tab:hover {
    color: #4a3d8f;
}

.academy-auth-tab.active {
    color: #4a3d8f;
    border-bottom-color: #4a3d8f;
    background: #fff;
}

.academy-auth-close {
    position: absolute;
    right: 8px;
    top: 8px;
    background: none;
    border: none;
    font-size: 22px;
    color: #999;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.academy-auth-close:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #333;
}

/* Forms */
.academy-auth-form {
    padding: 24px;
}

.academy-auth-field {
    margin-bottom: 16px;
}

.academy-auth-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #555;
    margin-bottom: 4px;
}

.academy-auth-hint {
    font-weight: 400;
    color: #999;
}

.academy-auth-field input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 15px;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.academy-auth-field input:focus {
    outline: none;
    border-color: #4a3d8f;
    box-shadow: 0 0 0 3px rgba(74, 61, 143, 0.4);
}

/* Error message */
.academy-auth-error {
    background: #fef2f2;
    color: #dc3545;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 12px;
    border: 1px solid #fecaca;
}

/* Submit button */
.academy-auth-submit {
    width: 100%;
    padding: 12px;
    background: #4a3d8f;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.academy-auth-submit:hover:not(:disabled) {
    background: #5b4ba8;
    transform: translateY(-1px);
}

.academy-auth-submit:disabled {
    opacity: 0.7;
    cursor: wait;
}

/* Spinner */
.academy-auth-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: authSpin 0.6s linear infinite;
}

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

/* Switch link */
.academy-auth-switch {
    text-align: center;
    margin-top: 16px;
    font-size: 13px;
    color: #888;
}

.academy-auth-switch a {
    color: #4a3d8f;
    font-weight: 600;
    text-decoration: none;
}

.academy-auth-switch a:hover {
    text-decoration: underline;
}

/* Mobile */
@media (max-width: 575.98px) {
    .academy-auth-card {
        border-radius: 12px;
        max-width: 95vw;
    }

    .academy-auth-form {
        padding: 16px;
    }

    .academy-auth-tab {
        font-size: 14px;
        padding: 12px 10px;
    }
}
