﻿.empty-state .empty-desc {
    font-size: 15px;
    color: #007AFF !important;
    font-weight: 500;
    margin-top: 8px;
    text-shadow: 0 1px 4px rgba(0,0,0,0.10);
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    height: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #f5f5f5;
    color: #000;
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent;
}

.app-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    background: #f5f5f5;
}

/* Header */
.header {
    background: #ffffff;
    border-bottom: 1px solid #e5e5e5;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    padding: 16px;
    position: sticky;
    top: 0;
    z-index: 100;
    /* Ensure header content is centered */
}

.header-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    max-width: 800px;
    margin: 0 auto;
}

.header-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.header-title-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.cardinal-icon {
    display: flex;
    align-items: center;
    height: 40px;
    width: 40px;
}

.title {
    font-size: 28px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 4px;
}

.last-updated {
    font-size: 13px;
    color: #888;
    font-weight: 400;
}

/* Refresh Button */
.refresh-button {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #007AFF;
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.2s, transform 0.1s;
    box-shadow: 0 2px 8px rgba(0, 122, 255, 0.3);
}

.refresh-button:active {
    transform: scale(0.95);
}

.refresh-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.refresh-icon {
    width: 20px;
    height: 20px;
    animation: none;
    transition: transform 0.3s ease;
}

.refresh-button.spinning .refresh-icon {
    animation: spin 1s linear infinite;
}

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

/* Search Bar */
.search-container {
    background: #ffffff;
    padding: 12px 16px;
    border-bottom: 1px solid #e5e5e5;
}

.search-input {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    display: block;
    padding: 10px 16px;
    font-size: 16px;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    background: #f5f5f5;
    font-family: inherit;
    transition: background 0.2s, border-color 0.2s;
}

.search-input:focus {
    outline: none;
    background: #ffffff;
    border-color: #007AFF;
}

.search-input::placeholder {
    color: #888;
}

/* Main Content */
.main-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
}

.school-list {
    padding: 16px;
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* School Card */
.school-card {
    background: white;
    border-radius: 12px;
    border: 1px solid #e5e5e5;
    padding: 16px;
    display: flex;
    gap: 12px;
    animation: slideIn 0.3s ease-out;
}

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

.card-icon {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.card-content {
    flex: 1;
    min-width: 0;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 8px;
}

.school-name {
    font-size: 17px;
    font-weight: 600;
    color: #000;
    line-height: 1.3;
    word-break: break-word;
}

.school-status {
    font-size: 14px;
    font-weight: 600;
    margin-top: 4px;
}

.status-closed {
    color: #FF3B30;
}

.status-delayed {
    color: #FF9500;
}

.status-other {
    color: #FFCC00;
}

.card-divider {
    height: 1px;
    background: #e5e5e5;
    margin: 8px 0;
}

.card-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 13px;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #888;
}

.detail-icon {
    width: 12px;
    height: 12px;
    flex-shrink: 0;
}

/* Loading State */
.loading-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    z-index: 200;
    backdrop-filter: blur(1px);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #007AFF;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading-overlay p {
    font-size: 16px;
    font-weight: 500;
    color: #666;
}

/* Empty State */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 32px;
    text-align: center;
    flex: 1;
}

.empty-icon {
    font-size: 60px;
    margin-bottom: 16px;
    color: #34C759;
}


.empty-state h2 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 8px;
    color: #007AFF;
    text-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.empty-state p {
    font-size: 16px;
    color: #333;
    font-weight: 500;
    text-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

/* Error State */
.error-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 32px;
    text-align: center;
    flex: 1;
}

.error-icon {
    font-size: 60px;
    margin-bottom: 16px;
    color: #FF3B30;
}

.error-state h2 {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #000;
}

.error-state p {
    font-size: 16px;
    color: #888;
    margin-bottom: 24px;
}

.retry-button {
    padding: 12px 24px;
    background: #007AFF;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.retry-button:active {
    background: #0051D5;
}

/* Scrollbar Styling */
.main-content::-webkit-scrollbar {
    width: 8px;
}

.main-content::-webkit-scrollbar-track {
    background: transparent;
}

.main-content::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}

.main-content::-webkit-scrollbar-thumb:hover {
    background: #999;
}

/* Safe Area Padding */
@supports (padding: max(0px)) {
    body {
        padding-left: env(safe-area-inset-left);
        padding-right: env(safe-area-inset-right);
        padding-bottom: env(safe-area-inset-bottom);
    }
}

/* Mobile Responsive */
@media (max-width: 480px) {
    .title {
        font-size: 24px;
    }

    .school-list {
        padding: 12px;
        gap: 10px;
    }

    .school-card {
        padding: 14px;
        gap: 10px;
    }

    .school-name {
        font-size: 16px;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    body {
        background: #1c1c1e;
        color: #fff;
    }

    .header {
        background: #2c2c2e;
        border-bottom-color: #444;
    }

    .search-container {
        background: #2c2c2e;
        border-bottom-color: #444;
    }

    .search-input {
        background: #1c1c1e;
        border-color: #444;
        color: #fff;
    }

    .search-input:focus {
        background: #2c2c2e;
        border-color: #007AFF;
    }

    .search-input::placeholder {
        color: #888;
    }

    .title {
        color: #fff;
    }

    .last-updated {
        color: #888;
    }

    .school-card {
        background: #2c2c2e;
        border-color: #444;
    }

    .school-name {
        color: #fff;
    }

    .card-divider {
        background: #444;
    }

    .detail-item {
        color: #999;
    }

    .empty-state h2 {
        color: #4da3ff;
        text-shadow: 0 1px 6px rgba(0,0,0,0.18);
    }
    .empty-state p {
        color: #007AFF !important;
        text-shadow: 0 1px 6px rgba(0,0,0,0.18);
    }
    .error-state p {
        color: #999;
    }
    .error-state h2 {
        color: #fff;
    }
}
