/* Results page specific styles */

.results-container {
    background: #EDE7E3;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    overflow: hidden;
    margin-bottom: 2rem;
}

/* Loading and error states */
.loading-state,
.error-state {
    padding: 4rem 2rem;
    text-align: center;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e5e7eb;
    border-top: 4px solid #489FB5;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

.error-state h3 {
    color: #dc2626;
    margin-bottom: 1rem;
}

.retry-btn {
    background: #489FB5;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    margin-top: 1rem;
}

/* Stats section */
.stats-section {
    padding: 2rem;
    border-bottom: 1px solid #e5e7eb;
}

.stats-section h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
}

.stat-card {
    background: linear-gradient(135deg, #489FB5 0%, #16697A 100%);
    color: white;
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(72, 159, 181, 0.3);
}

.stat-number {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.9;
    font-weight: 500;
}

/* Calendar section */
.calendar-section {
    padding: 2rem;
    border-bottom: 1px solid #e5e7eb;
}

.calendar-section h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* View Toggle */
.view-toggle {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    justify-content: center;
    background: rgba(72, 159, 181, 0.1);
    padding: 0.5rem;
    border-radius: 8px;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.view-btn {
    flex: 1;
    padding: 0.75rem 1.5rem;
    border: none;
    background: transparent;
    color: #489FB5;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.view-btn:hover {
    background: rgba(72, 159, 181, 0.2);
}

.view-btn.active {
    background: #489FB5;
    color: white;
    box-shadow: 0 2px 8px rgba(72, 159, 181, 0.3);
}

/* Calendar Filter */
.calendar-filter {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.filter-btn {
    padding: 0.5rem 1rem;
    border: 2px solid #489FB5;
    background: transparent;
    color: #489FB5;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.filter-btn:hover {
    background: rgba(72, 159, 181, 0.1);
}

.filter-btn.active {
    background: #489FB5;
    color: white;
}

.calendar-container {
    padding-bottom: 1rem;
}

/* Grouped List View */
.grouped-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.date-group {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    border: 1px solid rgba(72, 159, 181, 0.1);
}

.date-header {
    font-size: 1.3rem;
    font-weight: 600;
    color: #16697A;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.people-count {
    background: #FFA62B;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

.family-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.family-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(72, 159, 181, 0.05);
    border-radius: 8px;
    border-left: 4px solid #82C0CC;
}

.travel-icon {
    font-size: 1.5rem;
    width: 2rem;
    text-align: center;
}

.family-details {
    flex: 1;
}

.family-name {
    font-weight: 600;
    color: #16697A;
    margin-bottom: 0.25rem;
}

.family-info {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.4;
}

.no-events {
    text-align: center;
    color: #666;
    padding: 2rem;
    font-style: italic;
}

.calendar-timeline {
    display: flex;
    gap: 1rem;
    min-width: 800px;
    padding: 1rem 0;
}

.calendar-date {
    flex-shrink: 0;
    width: 120px;
    text-align: center;
}

.date-header {
    font-weight: 600;
    color: #faf9f7;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    padding: 0.5rem;
    background: #489FB5;
    border-radius: 6px;
}

.date-summary {
    background: #FFA62B;
    color: white;
    padding: 0.5rem;
    border-radius: 6px;
    margin-top: 0.5rem;
    font-size: 0.8rem;
    font-weight: 500;
    text-align: center;
    line-height: 1.2;
}

.date-events {
    min-height: 100px;
}

.calendar-event {
    background: #faf9f7;
    border: none;
    border-radius: 8px;
    padding: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.8rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: relative;
}

.calendar-event.arrival {
    border-left: 4px solid #10b981;
    background: #faf9f7;
}

.calendar-event.departure {
    border-left: 4px solid #f59e0b;
    background: #faf9f7;
}

.calendar-event.staying {
    border-left: 4px solid #489FB5;
    background: #faf9f7;
}

.event-family {
    font-weight: 600;
    color: #374151;
}

.event-details {
    font-size: 0.7rem;
    color: #6b7280;
    margin-top: 0.25rem;
}

.event-airport {
    display: inline-block;
    background: #f3f4f6;
    color: #374151;
    padding: 0.125rem 0.375rem;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 500;
    margin-top: 0.25rem;
}

.event-airport.edmonton {
    background: #dbeafe;
    color: #1e40af;
}

.event-airport.calgary {
    background: #fef3c7;
    color: #92400e;
}

/* Info cards */
.card-section {
    padding: 2rem;
    border-bottom: 1px solid #e5e7eb;
}

.card-section:last-child {
    border-bottom: none;
}

.card-section h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.info-card {
    background: transparent;
    border: none;
    border-radius: 12px;
    padding: 1.5rem;
}

.dietary-list,
.talent-list,
.travel-notes-list {
    space-y: 1rem;
}

.dietary-item,
.talent-item,
.travel-notes-item {
    background: #faf9f7;
    border: none;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.item-family {
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
}

.item-details {
    color: #6b7280;
    line-height: 1.5;
}

.item-count {
    display: inline-block;
    background: #489FB5;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
    margin-left: 0.5rem;
}

.no-data {
    text-align: center;
    color: #9ca3af;
    font-style: italic;
    padding: 2rem;
}

/* Actions section */
.actions-section {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 2rem;
}

.action-btn {
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 500;
    font-size: 1rem;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.action-btn.primary {
    background: #FFA62B;
    color: white;
}

.action-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(255, 166, 43, 0.4);
}

.action-btn.secondary {
    background: #489FB5;
    color: white;
    border: 2px solid #489FB5;
}

.action-btn.secondary:hover {
    background: #16697A;
    border-color: #16697A;
    color: white;
}

/* Responsive design */
@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .calendar-filter {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .filter-btn {
        padding: 0.75rem 1rem;
        font-size: 1rem;
        min-height: 44px; /* Better touch targets */
    }
    
    .calendar-timeline {
        overflow-x: auto;
        min-width: 100%;
        padding-bottom: 1rem;
    }
    
    .calendar-date {
        width: 140px; /* Larger for better touch */
        min-width: 140px;
    }
    
    .date-header {
        font-size: 1rem;
        padding: 0.75rem;
    }
    
    .calendar-event {
        padding: 0.75rem;
        margin-bottom: 0.75rem;
        min-height: 44px; /* Touch target */
    }
    
    .event-family {
        font-size: 1rem;
    }
    
    .event-details {
        font-size: 0.9rem;
    }
    
    .date-summary {
        padding: 0.75rem;
        font-size: 0.9rem;
        line-height: 1.4;
    }
    
    .actions-section {
        flex-direction: column;
        align-items: center;
    }
    
    .action-btn {
        width: 200px;
        text-align: center;
        min-height: 44px;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .calendar-date {
        width: 120px;
        min-width: 120px;
    }
    
    .date-header {
        font-size: 0.9rem;
        padding: 0.5rem;
    }
    
    .calendar-event {
        padding: 0.5rem;
    }
    
    .date-summary {
        padding: 0.5rem;
        font-size: 0.8rem;
    }
    
    .action-btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .results-container {
        margin: 0 -10px;
        border-radius: 12px;
    }
    
    .stats-section,
    .calendar-section,
    .card-section {
        padding: 1.5rem;
    }
}

/* Animation for loading in content */
.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

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