/**
 * Login Page Styles
 * Beautiful, modern login interface
 */

.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

/* Background with school image */
.login-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../../wp-content/uploads/2017/05/kfs-websiteblackboard-Large.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    filter: brightness(0.4);
    z-index: 0;
}

.login-background::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.5) 100%);
}

.login-content {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 450px;
    padding: var(--spacing-md);
    animation: fadeInUp 0.6s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-box {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: var(--spacing-xl);
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

/* Logo section */
.logo-section {
    text-align: center;
    margin-bottom: var(--spacing-xl);
}

.login-logo {
    width: 120px;
    height: auto;
    margin-bottom: var(--spacing-md);
    animation: float 3s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.logo-section h1 {
    font-size: 32px;
    font-weight: 400;
    color: var(--text-dark);
    margin-bottom: var(--spacing-xs);
}

.tagline {
    font-size: 14px;
    color: var(--text-secondary);
    font-style: italic;
}

/* Form styles */
.login-form {
    margin-bottom: var(--spacing-lg);
}

.form-group {
    margin-bottom: var(--spacing-md);
}

.form-group label {
    display: block;
    margin-bottom: var(--spacing-xs);
    font-weight: 500;
    color: var(--text-dark);
    font-size: 14px;
}

/* Role Selection Styles */
.role-selection {
    margin-bottom: var(--spacing-md);
}

.radio-group {
    display: flex;
    gap: var(--spacing-md);
    margin-top: 8px;
}

.radio-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    position: relative;
    padding-left: 28px;
    font-weight: 400;
    color: var(--text-dark);
    user-select: none;
}

.radio-label input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.radio-custom {
    position: absolute;
    top: 0;
    left: 0;
    height: 20px;
    width: 20px;
    background-color: #eee;
    border-radius: 50%;
    border: 2px solid #ddd;
    transition: all 0.2s ease;
}

.radio-label:hover .radio-custom {
    background-color: #f0f0f0;
    border-color: var(--accent-color);
}

.radio-label input:checked~.radio-custom {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
}

.radio-custom:after {
    content: "";
    position: absolute;
    display: none;
}

.radio-label input:checked~.radio-custom:after {
    display: block;
}

.radio-label .radio-custom:after {
    top: 5px;
    left: 5px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: white;
}

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

.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color var(--transition-fast);
}

.toggle-password:hover {
    color: var(--text-dark);
}

.eye-icon {
    width: 20px;
    height: 20px;
}

/* Form options */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-md);
    font-size: 13px;
}

.remember-me {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.remember-me input[type="checkbox"] {
    width: auto;
    margin-right: var(--spacing-xs);
    cursor: pointer;
}

.forgot-password {
    color: var(--accent-color);
    font-weight: 500;
}

.forgot-password:hover {
    text-decoration: underline;
}

/* Submit button */
.login-form .btn-primary {
    width: 100%;
    padding: 16px;
    font-size: 16px;
    font-weight: 600;
    margin-top: var(--spacing-md);
    background: linear-gradient(135deg, #ffffff 0%, #f7f7f7 100%);
    color: var(--text-dark);
    position: relative;
    overflow: hidden;
}

.login-form .btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.login-form .btn-primary:hover::before {
    left: 100%;
}

.login-form .btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-loader {
    display: inline-flex;
    align-items: center;
}

/* Help section */
.help-section {
    text-align: center;
    padding: var(--spacing-md) 0;
    border-top: 1px solid var(--border-color);
    margin-top: var(--spacing-lg);
}

.help-section p {
    margin-bottom: var(--spacing-xs);
    color: var(--text-secondary);
    font-size: 13px;
}

.help-section a {
    color: var(--accent-color);
    font-weight: 500;
}

.back-to-site {
    text-align: center;
    margin-top: var(--spacing-md);
}

.back-to-site a {
    color: var(--text-secondary);
    font-size: 13px;
    transition: all var(--transition-fast);
}

.back-to-site a:hover {
    color: var(--text-dark);
}

/* Reset modal specific styles */
#resetModal .modal-content h2 {
    margin-bottom: var(--spacing-sm);
    color: var(--text-dark);
}

#resetModal .modal-content p {
    margin-bottom: var(--spacing-lg);
    color: var(--text-secondary);
}

#resetForm .btn-primary {
    width: 100%;
    margin-top: var(--spacing-md);
}

/* Responsive design */
@media only screen and (max-width: 767px) {
    .login-content {
        max-width: 100%;
    }

    .login-box {
        padding: var(--spacing-lg);
    }

    .login-logo {
        width: 100px;
    }

    .logo-section h1 {
        font-size: 26px;
    }

    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--spacing-sm);
    }
}

/* Dark mode support (optional) */
@media (prefers-color-scheme: dark) {
    .login-box {
        background: rgba(30, 30, 30, 0.95);
    }

    .login-box h1,
    .form-group label {
        color: #e0e0e0;
    }

    input[type="text"],
    input[type="email"],
    input[type="password"] {
        background-color: rgba(50, 50, 50, 0.8);
        color: #e0e0e0;
        border-color: #555;
    }

    .tagline,
    .help-section p,
    .back-to-site a {
        color: #b0b0b0;
    }
}

/* Animations for error/success messages */
.error-message,
.success-message {
    animation: shake 0.5s ease;
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    10%,
    30%,
    50%,
    70%,
    90% {
        transform: translateX(-5px);
    }

    20%,
    40%,
    60%,
    80% {
        transform: translateX(5px);
    }
}