/**
 * Main Calendar Stylesheet
 * Imports all component stylesheets and provides global styles
 */

@import url('./components/calendar-grid.css');
@import url('./components/modals.css');
@import url('./components/forms.css');
@import url('./components/searchable-select.css');

/* Global calendar styles */
.calendar-page {
    background-color: #f9fafb;
    min-height: 100vh;
}

/* Navigation styles */
.calendar-nav {
    background: linear-gradient(to right, #1e40af, #3b82f6);
    color: white;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.calendar-nav h1 {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.025em;
}

.calendar-nav a {
    color: #bfdbfe;
    transition: color 0.2s ease-in-out;
}

.calendar-nav a:hover {
    color: white;
}

/* Main container */
.calendar-container {
    max-width: 80rem;
    margin: 0 auto;
    padding: 0 1.5rem;
    margin-top: 2rem;
}

/* Controls section */
.calendar-controls {
    background-color: white;
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.calendar-controls .controls-grid {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    gap: 1.5rem;
}

.calendar-controls .form-group {
    flex: 1;
    min-width: 12rem;
}

.calendar-controls .load-button {
    background-color: #1e40af;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 500;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    transition: background-color 0.2s ease-in-out;
}

.calendar-controls .load-button:hover {
    background-color: #1d4ed8;
}

/* Legend */
.calendar-legend {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e5e7eb;
}

.calendar-legend h3 {
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.75rem;
}

.calendar-legend .legend-items {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    font-size: 0.875rem;
}

.calendar-legend .legend-item {
    display: flex;
    align-items: center;
}

.calendar-legend .legend-indicator {
    width: 1rem;
    height: 1rem;
    border-radius: 0.25rem;
    margin-right: 0.5rem;
}

.calendar-legend .available .legend-indicator {
    background-color: #ecfdf5;
    border: 2px solid #10b981;
}

.calendar-legend .booked .legend-indicator {
    background-color: #fef2f2;
    border: 2px solid #ef4444;
}

.calendar-legend .selected .legend-indicator {
    background-color: #dbeafe;
    border: 2px solid #3b82f6;
}

/* Calendar grid container */
.calendar-grid-container {
    background-color: white;
    border-radius: 0.75rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
    overflow: hidden;
}

.calendar-empty-state {
    padding: 3rem;
    text-align: center;
}

.calendar-empty-state svg {
    width: 4rem;
    height: 4rem;
    margin: 0 auto 1rem;
    color: #9ca3af;
}

.calendar-empty-state h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 0.5rem;
}

.calendar-empty-state p {
    color: #6b7280;
}

/* Global success notification */
.global-notification {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 50;
    max-width: 24rem;
}

.global-notification.hidden {
    display: none;
}

.global-notification .notification-content {
    background-color: white;
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
    padding: 1rem;
}

.global-notification.success .notification-content {
    border-left: 4px solid #10b981;
}

.global-notification.error .notification-content {
    border-left: 4px solid #ef4444;
}

.global-notification .notification-header {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
}

.global-notification .notification-icon {
    width: 1.25rem;
    height: 1.25rem;
    margin-right: 0.75rem;
}

.global-notification.success .notification-icon {
    color: #10b981;
}

.global-notification.error .notification-icon {
    color: #ef4444;
}

.global-notification .notification-title {
    font-weight: 500;
    color: #111827;
}

.global-notification .notification-message {
    color: #6b7280;
    font-size: 0.875rem;
}

.global-notification .notification-close {
    margin-left: auto;
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 0.25rem;
}

.global-notification .notification-close:hover {
    background-color: #f3f4f6;
    color: #6b7280;
}

/* Loading states */
.loading-spinner {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid #e5e7eb;
    border-top: 2px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Player management styles */
.players-section {
    margin-bottom: 1.5rem;
}

.players-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.player-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    transition: border-color 0.15s ease-in-out;
}

.player-item.member {
    background-color: #eff6ff;
    border-color: #bfdbfe;
}

.player-item.guest {
    background-color: #f0fdf4;
    border-color: #bbf7d0;
}

.player-indicator {
    width: 0.75rem;
    height: 0.75rem;
    border-radius: 50%;
    flex-shrink: 0;
}

.player-item.member .player-indicator {
    background-color: #3b82f6;
}

.player-item.guest .player-indicator {
    background-color: #10b981;
}

.player-content {
    flex: 1;
}

.player-actions {
    display: flex;
    gap: 0.5rem;
}

.add-player-buttons {
    display: flex;
    gap: 0.5rem;
}

.add-player-buttons button {
    flex: 1;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    border-radius: 0.5rem;
    transition: all 0.15s ease-in-out;
}

.add-member-btn {
    background-color: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
}

.add-member-btn:hover {
    background-color: #dbeafe;
}

.add-guest-btn {
    background-color: #f0fdf4;
    color: #059669;
    border: 1px solid #bbf7d0;
}

.add-guest-btn:hover {
    background-color: #dcfce7;
}

/* Responsive design */
@media (max-width: 768px) {
    .calendar-container {
        padding: 0 1rem;
        margin-top: 1rem;
    }
    
    .calendar-controls {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    .calendar-controls .controls-grid {
        flex-direction: column;
        gap: 1rem;
    }
    
    .calendar-controls .form-group {
        min-width: auto;
    }
    
    .calendar-legend .legend-items {
        flex-wrap: wrap;
        gap: 1rem;
    }
    
    .global-notification {
        left: 1rem;
        right: 1rem;
        max-width: none;
    }
    
    .add-player-buttons {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .calendar-nav h1 {
        font-size: 1.25rem;
    }
    
    .calendar-nav .nav-links {
        flex-direction: column;
        gap: 0.5rem;
    }
}