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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    background: #ffffff;
    color: #1a1a1a;
    line-height: 1.6;
}

/* Navigation Bar */
.navbar {
    background: #ffffff;
    padding: 1.25rem 2rem;
    border-bottom: 1px solid #e5e7eb;
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #111827;
    letter-spacing: -0.02em;
}

.filter-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.filter-label {
    color: #6b7280;
    font-size: 0.875rem;
    font-weight: 500;
}

.city-filter {
    padding: 0.5rem 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 0.875rem;
    color: #374151;
    background: #ffffff;
    cursor: pointer;
    transition: all 0.15s ease;
    min-width: 150px;
}

.city-filter:hover {
    border-color: #9ca3af;
}

.city-filter:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Search Container */
.search-container {
    flex: 1;
    max-width: 500px;
    margin: 0 2rem;
}

.search-box {
    position: relative;
}

.search-input {
    width: 100%;
    padding: 0.5rem 2.5rem 0.5rem 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 0.95rem;
    background: white;
    transition: all 0.2s ease;
}

.search-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.search-icon {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    font-size: 1.1rem;
    pointer-events: none;
}

/* Search Dropdown */
.search-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 0.5rem;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    max-height: 400px;
    overflow-y: auto;
    z-index: 1000;
}

.search-dropdown.no-results {
    padding: 1rem;
    text-align: center;
    color: #6b7280;
}

.search-result-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: background 0.2s ease;
    border-bottom: 1px solid #f3f4f6;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background: #f9fafb;
}

.result-type {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-right: 1rem;
    white-space: nowrap;
}

.result-type.type-room {
    background: #dbeafe;
    color: #1e40af;
}

.result-type.type-meeting {
    background: #fef3c7;
    color: #92400e;
}

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

.result-title {
    font-weight: 600;
    color: #111827;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.result-subtitle {
    font-size: 0.875rem;
    color: #6b7280;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.result-status {
    margin-left: 1rem;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

.result-status.status-busy {
    background: #fee2e2;
    color: #dc2626;
}

.result-status.status-available {
    background: #d1fae5;
    color: #059669;
}

/* Container */
.container {
    max-width: 1400px;
    margin: 2rem auto;
    padding: 0 2rem;
}

/* Loading State */
.loading {
    text-align: center;
    padding: 6rem 2rem;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f3f4f6;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto;
}

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

.loading p {
    margin-top: 1rem;
    color: #6b7280;
    font-size: 0.875rem;
}

/* Error State */
.error-message {
    background: #fef2f2;
    color: #991b1b;
    padding: 1rem 1.5rem;
    border-radius: 6px;
    border-left: 4px solid #ef4444;
    margin: 2rem 0;
}

/* Room Grid */
.rooms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.25rem;
}

/* Room Card */
.room-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 1.5rem;
    transition: all 0.15s ease;
    position: relative;
}

.room-card:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transform: translateY(-1px);
}

.room-card.search-highlight {
    animation: highlight-pulse 2s ease-in-out;
    border: 2px solid #3b82f6;
}

@keyframes highlight-pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    }
    50% {
        transform: scale(1.02);
        box-shadow: 0 8px 20px rgba(59, 130, 246, 0.2);
    }
}

.room-card.room-busy {
    background: #ffffff;
    border-color: #e5e7eb;
    border-top: 3px solid #ef4444;
}

.room-card.room-available {
    background: #ffffff;
    border-color: #e5e7eb;
    border-top: 3px solid #10b981;
}

/* Room Status */
.room-status {
    margin-bottom: 1rem;
}

.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.status-indicator::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.status-busy {
    color: #dc2626;
}

.status-busy::before {
    background: #dc2626;
    animation: blink 2s infinite;
}

.status-available {
    color: #059669;
}

.status-available::before {
    background: #10b981;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* Room Info */
.room-info {
    margin-bottom: 1.25rem;
}

.room-name {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: #111827;
    line-height: 1.3;
}

.meeting-info {
    margin-top: 0.75rem;
    padding-left: 0.75rem;
    border-left: 2px solid #e5e7eb;
}

.meeting-subject {
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.25rem;
    font-size: 0.875rem;
}

.meeting-time {
    color: #6b7280;
    font-size: 0.813rem;
    margin-bottom: 0.25rem;
}

.meeting-organizer {
    color: #9ca3af;
    font-size: 0.75rem;
}

.next-meeting {
    margin-top: 0.75rem;
    padding: 0.75rem;
    background: #f9fafb;
    border-radius: 4px;
    font-size: 0.875rem;
}

.next-label {
    font-weight: 500;
    color: #6b7280;
    display: block;
    margin-bottom: 0.25rem;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.no-meeting {
    color: #6b7280;
    font-size: 0.875rem;
    margin-top: 0.75rem;
    font-style: italic;
}

/* Room Actions */
.room-actions {
    display: flex;
    gap: 0.5rem;
    padding-top: 1rem;
    border-top: 1px solid #f3f4f6;
}

.action-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    color: #6b7280;
    text-decoration: none;
    transition: all 0.15s ease;
    font-size: 14px;
}

.action-icon:hover {
    background: #3b82f6;
    border-color: #3b82f6;
    color: white;
}

.action-icon.action-upcoming {
    background: #fef3c7;
    border-color: #fde68a;
    color: #d97706;
}

.action-icon.action-upcoming:hover {
    background: #f59e0b;
    border-color: #f59e0b;
    color: white;
}

.action-icon.action-daily {
    background: #dbeafe;
    border-color: #93c5fd;
    color: #2563eb;
}

.action-icon.action-daily:hover {
    background: #2563eb;
    border-color: #2563eb;
    color: white;
}

.action-icon.action-weekly {
    background: #e9d5ff;
    border-color: #c084fc;
    color: #9333ea;
}

.action-icon.action-weekly:hover {
    background: #9333ea;
    border-color: #9333ea;
    color: white;
}

/* Responsive */
@media (max-width: 768px) {
    .navbar-container {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }

    .rooms-grid {
        grid-template-columns: 1fr;
    }

    .container {
        padding: 0 1rem;
    }
}

/* Subtle animations */
.room-card {
    animation: fadeIn 0.3s ease-out;
}

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

/* Typography */
h1, h2, h3, h4, h5, h6 {
    line-height: 1.2;
}

/* Focus styles */
:focus-visible {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f3f4f6;
}

::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}