/* Calendar & Scheduling Styles */

.calendar-container {
    padding: 2rem;
    max-width: 1600px;
    margin: 0 auto;
}

/* Page Header */
.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.calendar-header h1 {
    font-size: 2.5rem;
    color: var(--text-color);
    margin: 0;
    font-weight: 700;
}

.subtitle {
    color: var(--text-muted);
    font-size: 1rem;
    margin: 0.5rem 0 0 0;
}

.header-actions {
    display: flex;
    gap: 1rem;
}

/* Metrics Cards */
.calendar-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.metric-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.metric-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.metric-card.primary-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.metric-card.primary-card .metric-label,
.metric-card.primary-card .metric-trend {
    color: rgba(255, 255, 255, 0.9);
}

.metric-label {
    font-size: 0.875rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.metric-value {
    font-size: 42px;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.metric-trend {
    font-size: 0.875rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.metric-trend.trend-up {
    color: #10b981;
}

.metric-trend.trend-down {
    color: #ef4444;
}

.metric-progress {
    margin-top: 1rem;
}

.progress-bar {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    height: 8px;
    overflow: hidden;
}

.progress-fill {
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    height: 100%;
    border-radius: 8px;
    transition: width 0.6s ease;
}

.progress-fill.green {
    background: linear-gradient(90deg, #10b981 0%, #059669 100%);
}

.progress-fill.blue {
    background: linear-gradient(90deg, #3b82f6 0%, #2563eb 100%);
}

.progress-fill.purple {
    background: linear-gradient(90deg, #8b5cf6 0%, #7c3aed 100%);
}

/* Filters Panel */
.filters-panel {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.filters-content h3 {
    margin: 0 0 1.5rem 0;
    color: var(--text-color);
    font-size: 1.25rem;
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.filter-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
    font-size: 0.875rem;
    font-weight: 600;
}

.filter-group select,
.filter-group input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 0.875rem;
    background: white;
}

.filter-group select:focus,
.filter-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.custom-date-range {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
}

.filter-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 1.5rem;
}

/* Calendar Wrapper */
.calendar-wrapper {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    margin-bottom: 2rem;
}

#calendar {
    height: 800px;
}

/* FullCalendar Customization */
.fc {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.fc .fc-button-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.fc .fc-button-primary:hover {
    background: linear-gradient(135deg, #5568d3 0%, #653a8b 100%);
}

.fc .fc-button-primary:disabled {
    opacity: 0.5;
}

.fc-event {
    border: none;
    border-radius: 6px;
    padding: 4px 8px;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.fc-event:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Event Type Colors */
.fc-event.event-campus-visit {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

.fc-event.event-phone-call {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.fc-event.event-home-visit {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.fc-event.event-evaluation {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
}

.fc-event.event-camp,
.fc-event.event-combine {
    background: linear-gradient(135deg, #ec4899 0%, #db2777 100%);
}

.fc-event.event-game-visit {
    background: linear-gradient(135deg, #14b8a6 0%, #0d9488 100%);
}

.fc-event.event-meeting {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
}

.fc-event.event-other {
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
}

/* Upcoming Events Sidebar */
.upcoming-events {
    background: white;
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.upcoming-events h3 {
    margin: 0 0 1rem 0;
    font-size: 1.25rem;
    color: var(--text-color);
}

.events-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-height: 600px;
    overflow-y: auto;
}

.event-item {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    padding: 1rem;
    border-left: 4px solid #667eea;
    transition: all 0.2s ease;
    cursor: pointer;
}

.event-item:hover {
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.event-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.5rem;
}

.event-item-title {
    font-weight: 600;
    color: var(--text-color);
    font-size: 0.9rem;
}

.event-item-type {
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 6px;
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
}

.event-item-time {
    font-size: 0.875rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.event-item-player {
    font-size: 0.875rem;
    color: #667eea;
    margin-top: 0.25rem;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    animation: fadeIn 0.2s ease;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-content {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
}

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

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
}

.modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.2s ease;
}

.modal-close:hover {
    color: var(--text-color);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-color);
    font-weight: 600;
    font-size: 0.875rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 0.875rem;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 2rem;
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    border: none;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #5568d3 0%, #653a8b 100%);
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.4);
    transform: translateY(-2px);
}

.btn-secondary {
    background: white;
    color: var(--text-color);
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.btn-secondary:hover {
    background: #f9fafb;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    box-shadow: 0 4px 16px rgba(239, 68, 68, 0.4);
}

/* Event Details Content */
.detail-group {
    margin-bottom: 1.5rem;
}

.detail-label {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
    font-weight: 600;
}

.detail-value {
    font-size: 1rem;
    color: var(--text-color);
}

.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
}

.status-badge.scheduled {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

.status-badge.completed {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.status-badge.cancelled {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.status-badge.rescheduled {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .calendar-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .calendar-metrics {
        grid-template-columns: repeat(2, 1fr);
    }

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

    #calendar {
        height: 600px;
    }
}

@media (max-width: 640px) {
    .calendar-container {
        padding: 1rem;
    }

    .calendar-metrics {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    #calendar {
        height: 500px;
    }
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem;
    color: var(--text-muted);
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.empty-state-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.empty-state-text {
    font-size: 0.875rem;
}
