/**
 * Kindergarten Login - Additional Enhancements
 * Override Dore theme styles for the kindergarten login page
 */

/* ===== Base Page Setup ===== */
.kindergarten-login-page {
    background: #FFFDE7;
}

.kindergarten-login-page .fixed-background.kindergarten-bg {
    display: none; /* Hide original background for kindergarten page */
}

/* Override Dore theme styles for login page */
.kindergarten-login-page .container {
    width: 100%;
    max-width: none;
    padding: 0;
}

.kindergarten-login-page main {
    margin: 0;
    min-height: 100vh;
}

/* ===== Accessibility Enhancements ===== */
.kindergarten-login-page *:focus-visible {
    outline: 3px solid var(--primary-blue, #5C9BCB);
    outline-offset: 2px;
}

/* ===== Animation for Card Entrance ===== */
@keyframes cardSlideIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.kindergarten-card {
    animation: cardSlideIn 0.6s ease-out forwards;
}

/* ===== Enhanced Hover Effects ===== */
.login-button {
    position: relative;
    overflow: hidden;
}

.login-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.login-button:hover::before {
    width: 300px;
    height: 300px;
}

/* ===== Input Focus Glow Effect ===== */
.login-form__input:focus {
    box-shadow:
        0 0 0 4px var(--kindergarten-blue, #E3F2FD),
        0 2px 8px rgba(92, 155, 203, 0.2);
}

/* ===== Success Checkmark Animation for Validated Fields ===== */
.login-form__input.valid {
    border-color: var(--primary-green, #7CB342) !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%237CB342'%3E%3Cpath d='M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 18px;
}

/* ===== Pulse Animation for Welcome Title ===== */
@keyframes gentlePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

.login-welcome__title {
    animation: gentlePulse 3s ease-in-out infinite;
}

/* ===== Smooth Scrolling ===== */
.kindergarten-login-page {
    scroll-behavior: smooth;
}

/* ===== Print Styles ===== */
@media print {
    .bg-kindergarten,
    .login-social,
    .sso-button {
        display: none !important;
    }

    .kindergarten-card__illustration {
        display: none;
    }

    .kindergarten-card__form {
        padding: 20px;
    }
}

/* ===== High Contrast Mode Support ===== */
@media (prefers-contrast: high) {
    :root {
        --border-color: #455A64;
        --text-secondary: #37474F;
    }

    .login-form__input {
        border-width: 3px;
    }

    .login-button {
        border: 2px solid var(--text-primary);
    }
}

/* ===== Reduced Motion Support ===== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .bg-shape {
        display: none;
    }
}
