/* Stork Locator v2.0 - Styles */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --school-red: #a11e24;
    --school-red-dark: #7a1619;
    --stork-gray: #4A5568;
    --light-gray: #F7FAFC;
    --soft-gray: #E2E8F0;
    --free-green: #48BB78;
}

body {
    font-family: 'DM Sans', sans-serif;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* Authentication Screen */
.auth-screen {
    background: white;
    border-radius: 32px;
    padding: 48px;
    max-width: 450px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(161, 30, 36, 0.15);
    text-align: center;
}

.auth-screen h2 {
    font-family: 'Fredoka', sans-serif;
    font-size: 32px;
    color: var(--school-red);
    margin-bottom: 12px;
}

.auth-screen p {
    color: var(--stork-gray);
    margin-bottom: 32px;
    font-size: 15px;
}

.google-btn {
    background: white;
    border: 2px solid var(--soft-gray);
    padding: 14px 28px;
    border-radius: 12px;
    font-family: 'DM Sans', sans-serif;
    font-size: 16px;
    font-weight: 500;
    color: var(--stork-gray);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    transition: all 0.3s ease;
}

.google-btn:hover {
    border-color: var(--school-red);
    box-shadow: 0 4px 12px rgba(161, 30, 36, 0.1);
}

.google-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.error-message {
    background: #FEE;
    color: #C33;
    padding: 12px;
    border-radius: 8px;
    margin-top: 16px;
    font-size: 14px;
}

/* Main Container */
.container {
    background: #FFFEF7;
    border-radius: 32px;
    padding: 48px;
    max-width: 520px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(161, 30, 36, 0.15);
    position: relative;
    animation: slideIn 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    display: none;
}

.container.show {
    display: block;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 24px;
}

.school-name {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--stork-gray);
    opacity: 0.6;
    margin-bottom: 8px;
}

h1 {
    font-family: 'Fredoka', sans-serif;
    font-size: 42px;
    color: var(--school-red);
    margin-bottom: 8px;
    font-weight: 600;
}

.subtitle {
    font-size: 15px;
    color: var(--stork-gray);
    opacity: 0.7;
}

/* Disclaimer */
.disclaimer {
    background: #FFF3CD;
    border: 1px solid #FFC107;
    border-radius: 12px;
    padding: 12px 16px;
    margin-bottom: 24px;
    font-size: 13px;
    color: #856404;
    display: flex;
    align-items: start;
    gap: 10px;
}

.disclaimer svg {
    flex-shrink: 0;
    margin-top: 2px;
}

/* Schedule Toggle */
.timetable-toggle {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-bottom: 24px;
}

.toggle-btn {
    padding: 10px 20px;
    border: 2px solid var(--soft-gray);
    background: white;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    color: var(--stork-gray);
    cursor: pointer;
    transition: all 0.3s ease;
}

.toggle-btn:hover {
    border-color: var(--school-red);
    background: var(--light-gray);
}

.toggle-btn.active {
    background: var(--school-red);
    color: white;
    border-color: var(--school-red);
    box-shadow: 0 4px 12px rgba(161, 30, 36, 0.2);
}

/* Search */
.form-group {
    margin-bottom: 28px;
}

label {
    display: block;
    font-weight: 500;
    color: var(--stork-gray);
    margin-bottom: 10px;
    font-size: 14px;
}

.search-dropdown-wrapper {
    position: relative;
}

.teacher-search-input {
    width: 100%;
    padding: 16px 50px;
    border: 2px solid var(--soft-gray);
    border-radius: 16px;
    font-size: 16px;
    color: var(--stork-gray);
    background: white;
    transition: all 0.3s ease;
    cursor: pointer;
}

.teacher-search-input:focus {
    outline: none;
    border-color: var(--school-red);
    box-shadow: 0 0 0 4px rgba(161, 30, 36, 0.1);
    cursor: text;
}

.search-icon {
    position: absolute;
    left: 18px;
    top: 18px;
    color: var(--stork-gray);
    opacity: 0.4;
    pointer-events: none;
    z-index: 2;
}

.dropdown-arrow {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--stork-gray);
    opacity: 0.4;
    pointer-events: none;
    transition: transform 0.3s ease;
}

.teacher-search-input:focus ~ .dropdown-arrow {
    transform: translateY(-50%) rotate(180deg);
}

/* Dropdown */
.teacher-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: white;
    border: 2px solid var(--soft-gray);
    border-radius: 16px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.teacher-dropdown.show {
    display: block;
    animation: dropdownSlide 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.teacher-option {
    padding: 14px 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 1px solid var(--soft-gray);
}

.teacher-option:last-child {
    border-bottom: none;
}

.teacher-option:hover,
.teacher-option:focus {
    background: var(--light-gray);
    outline: none;
}

.teacher-option.selected {
    background: var(--school-red);
    color: white;
}

.teacher-option-name {
    font-weight: 500;
    color: var(--stork-gray);
    font-size: 15px;
}

.teacher-option.selected .teacher-option-name {
    color: white;
}

.no-results {
    padding: 20px;
    text-align: center;
    color: var(--stork-gray);
    opacity: 0.6;
    font-size: 14px;
}

/* Result */
.result {
    background: white;
    border: 2px solid var(--soft-gray);
    border-radius: 20px;
    padding: 32px;
    margin-top: 24px;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.result.show {
    opacity: 1;
    transform: translateY(0);
}

.location-badge {
    display: inline-block;
    background: var(--school-red);
    color: white;
    padding: 8px 18px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 16px;
    box-shadow: 0 4px 12px rgba(161, 30, 36, 0.3);
}

.location-badge.free {
    background: var(--free-green);
    box-shadow: 0 4px 12px rgba(72, 187, 120, 0.3);
}

.current-location {
    font-family: 'Fredoka', sans-serif;
    font-size: 32px;
    color: var(--stork-gray);
    margin-bottom: 8px;
    font-weight: 600;
}

.room-detail {
    font-size: 15px;
    color: var(--stork-gray);
    opacity: 0.8;
    margin-bottom: 8px;
}

.next-section {
    background: var(--light-gray);
    border-radius: 14px;
    padding: 16px 20px;
    margin-top: 16px;
}

.next-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--stork-gray);
    opacity: 0.6;
    margin-bottom: 6px;
}

.next-location {
    font-size: 18px;
    font-weight: 600;
    color: var(--stork-gray);
}

.time-info {
    font-size: 14px;
    color: var(--school-red);
    margin-top: 4px;
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--stork-gray);
    opacity: 0.6;
}

.empty-state svg {
    width: 80px;
    height: 80px;
    margin-bottom: 16px;
    opacity: 0.3;
}

/* Logout Button */
.logout-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: transparent;
    border: 2px solid var(--soft-gray);
    color: var(--stork-gray);
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.logout-btn:hover {
    border-color: var(--school-red);
    color: var(--school-red);
}

/* Mobile Responsive */
@media (max-width: 600px) {
    .container,
    .auth-screen {
        padding: 32px 24px;
    }

    h1 {
        font-size: 34px;
    }

    .current-location {
        font-size: 26px;
    }

    .logout-btn {
        position: static;
        margin-bottom: 16px;
        width: 100%;
    }
}

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Focus visible for keyboard navigation */
*:focus-visible {
    outline: 2px solid var(--school-red);
    outline-offset: 2px;
}
