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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    background: linear-gradient(135deg, #AA0000 0%, #B3995D 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    overflow: hidden;
}

.header {
    background: linear-gradient(135deg, #AA0000 0%, #B3995D 100%);
    color: white;
    padding: 30px;
    text-align: center;
}

.header h1 {
    font-size: 1.8em;
    margin-bottom: 10px;
}

.header p {
    opacity: 0.9;
    font-size: 0.95em;
}

.content-wrapper {
    padding: 40px;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin: 0 auto 30px;
}

.month {
    background: white;
    border: 2px solid #AA0000;
    border-radius: 8px;
    padding: 15px;
}

.month-name {
    text-align: center;
    color: #AA0000;
    font-size: 1.3em;
    font-weight: bold;
    margin-bottom: 10px;
}

.days-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    margin-bottom: 5px;
}

.day-label {
    text-align: center;
    font-weight: bold;
    font-size: 0.85em;
    padding: 5px 2px;
}

.days-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}

.day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1.1em;
    font-weight: bold;
    transition: all 0.2s;
    background: white;
}

.day:hover {
    background: #FEE5E5;
    border-color: #AA0000;
}

.day.selected {
    background: #AA0000;
    color: white;
    border-color: #AA0000;
    font-weight: bold;
}

/* weekends: show same styling and red text for both Sunday and Saturday */
.day.sunday,
.day.saturday {
    background: #f0f0f0;
    font-style: italic;
    font-weight: normal;
    font-size: 0.9em;
    color: #d32f2f;
}

.day.selected.sunday,
.day.selected.saturday {
    color: white;
    background: #AA0000;
    font-style: italic;
}

/* Grey out and show not-allowed cursor for disabled days (e.g., weekends when disabled) */
.day.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none; /* optional: prevents hover/click events entirely */
}
.day.disabled[title]:hover {
  /* allow tooltip appearance in some browsers even with pointer-events:none removed */
}

.day.empty {
    cursor: default;
    border: none;
    background: transparent;
}

.day.empty:hover {
    background: transparent;
}

.controls {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

button {
    flex: 1;
    padding: 15px;
    font-size: 1.05em;
    font-weight: 600;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
    background: linear-gradient(135deg, #AA0000 0%, #B3995D 100%);
    color: white;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(170, 0, 0, 0.4);
}

button.secondary {
    background: #757575;
}

button.secondary:hover {
    background: #616161;
    transform: translateY(-2px);
}

.counter {
    text-align: center;
    font-size: 1.1em;
    margin-bottom: 15px;
    color: #333;
}

.filters {
    background: white;
    padding: 25px;
    border-radius: 8px;
    border: 2px solid #AA0000;
    margin-bottom: 30px;
}

.filter-row {
    display: flex;
    gap: 20px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.filter-group label {
    font-size: 0.9em;
    font-weight: bold;
    color: #333;
}

.filter-group select {
    padding: 8px 12px;
    font-size: 1em;
    border: 2px solid #ddd;
    border-radius: 4px;
    background: white;
    cursor: pointer;
    min-width: 150px;
}

.filter-group select:focus {
    outline: none;
    border-color: #AA0000;
}

.apply-button {
    padding: 10px 30px;
    margin-top: 18px;
}

@media (max-width: 1200px) {
    .calendar-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .calendar-grid {
        grid-template-columns: 1fr;
    }
    
    .filter-row {
        flex-direction: column;
        gap: 15px;
    }
}
