.tabs {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    border-bottom: 2px solid #e0e0e0;
}

.tabs > * {
    margin-right: 15px;
}

.tabs > *:last-child {
    margin-right: 0;
}

@supports (gap: 15px) {
    .tabs > * {
        margin-right: 0;
    }
}

.tab-btn {
    padding: 10px 15px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    color: #666;
    transition: all 0.3s ease;
}

.tab-btn:hover {
    color: #333;
}

.tab-btn.active {
    color: #667eea;
    border-bottom-color: #667eea;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.controls {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 25px;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 8px;
}

.controls > * {
    margin-right: 15px;
    margin-bottom: 15px;
}

@supports (gap: 15px) {
    .controls > * {
        margin-right: 0;
        margin-bottom: 0;
    }
}

.calendar-navigation {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-grow: 1;
}

.calendar-navigation > * {
    margin-right: 10px;
}

.calendar-navigation > *:last-child {
    margin-right: 0;
}

@supports (gap: 10px) {
    .calendar-navigation > * {
        margin-right: 0;
    }
}

.btn-primary:hover {
    background: #5568d3;
}

.current-week-text {
    font-weight: 600;
    font-size: 1.1rem;
    color: #333;
    margin-left: 10px;
}

.btn-secondary {
    background: #e0e0e0;
    color: #333;
}

.btn-secondary:hover {
    background: #d0d0d0;
}

.calendar-wrapper {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: auto;
    max-height: 600px;
    margin-bottom: 30px;
}

.calendar-header {
    display: inline-flex;
    min-width: 100%;
    position: sticky;
    top: 0;
    background: #f5f5f5;
    border-bottom: 2px solid #ddd;
    z-index: 10;
    box-sizing: border-box;
}

.time-column {
    width: 80px;
    padding: 12px;
    font-weight: 600;
    color: #333;
    border-right: 2px solid #ddd;
    flex-shrink: 0;
    box-sizing: border-box;
}

.date-header {
    flex: 1;
    padding: 12px;
    text-align: center;
    border-right: 1px solid #eee;
    min-width: 120px;
    box-sizing: border-box;
}

.date-header-date {
    font-weight: 600;
    color: #333;
}

.date-header-day {
    font-size: 0.85rem;
    color: #999;
}

.calendar-grid {
    display: inline-flex;
    min-width: 100%;
    box-sizing: border-box;
}

.time-slots {
    width: 80px;
    flex-shrink: 0;
    border-right: 2px solid #ddd;
}

.time-slot {
    height: 25px;
    padding: 2px 8px;
    border-bottom: 1px solid #eee;
    font-size: 0.75rem;
    color: #666;
    text-align: center;
    background: #fafafa;
}

.date-column {
    flex: 1;
    min-width: 120px;
    border-right: 1px solid #eee;
    position: relative;
}

.calendar-entry {
    position: absolute;
    left: 2px;
    right: 2px;
    border-radius: 4px;
    padding: 2px 4px;
    font-size: 0.7rem;
    overflow: hidden;
    text-overflow: ellipsis;
    z-index: 5;
    pointer-events: auto;
    border: 1px solid rgba(0,0,0,0.1);
}

.calendar-entry.own-busy {
    background-color: white;
    box-shadow: inset 0 0 0 2px #667eea;
    color: #333;
}

.calendar-entry.member-busy {
    background-color: white;
    box-shadow: inset 0 0 0 2px #e67e22;
    color: #333;
}

.calendar-entry.own-busy::after {
    content: 'YOU';
    position: absolute;
    top: 2px;
    right: 2px;
    background: #667eea;
    color: white;
    font-size: 0.5rem;
    padding: 1px 2px;
    border-radius: 2px;
    font-weight: bold;
}

.calendar-entry.band-event-rehearsal {
    background-color: #2ecc71;
    color: white;
}

.calendar-entry.band-event-gig {
    background-color: #3498db;
    color: white;
}

.calendar-entry .entry-title {
    font-weight: bold;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.availability-slot {
    height: 25px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    color: #666;
    position: relative;
    z-index: 1;
}

.availability-slot:hover {
    background: rgba(102, 126, 234, 0.1);
}

.availability-slot.empty {
    background: #f9f9f9;
}

.availability-slot.low {
    background: #ffecb3;
}

.availability-slot.medium {
    background: #ffcc80;
}

.availability-slot.high {
    background: #ff8a65;
}

.availability-slot.own-busy::after {
    content: 'YOU';
    position: absolute;
    top: 2px;
    right: 2px;
    background: #667eea;
    color: white;
    font-size: 0.6rem;
    padding: 1px 3px;
    border-radius: 3px;
    font-weight: bold;
    z-index: 2;
}

.availability-slot.own-busy {
    box-shadow: inset 0 0 0 2px #667eea;
}

.slot-info {
    font-size: 0.75rem;
    font-weight: bold;
    color: #333;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding: 0 4px;
}

.availability-slot.has-title {
    align-items: center;
    padding-top: 5px;
}

.entry-title-display {
    margin-bottom: 5px;
    font-size: 1.1rem;
    color: #667eea;
}

.legend {
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
    margin-top: 20px;
}

.legend h3 {
    margin-bottom: 15px;
    color: #333;
}

.legend-items {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.legend-items > * {
    margin-right: 20px;
    margin-bottom: 10px;
}

@supports (gap: 20px) {
    .legend-items > * {
        margin-right: 0;
        margin-bottom: 0;
    }
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.legend-item > * {
    margin-right: 8px;
}

.legend-item > *:last-child {
    margin-right: 0;
}

@supports (gap: 8px) {
    .legend-item > * {
        margin-right: 0;
    }
}

.color-box {
    width: 20px;
    height: 20px;
    border-radius: 4px;
}

.color-box.empty {
    background: #f9f9f9;
    border: 1px solid #ddd;
}

.color-box.low {
    background: #ffecb3;
}

.color-box.medium {
    background: #ffcc80;
}

.color-box.high {
    background: #ff8a65;
}

.form-card {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
    max-width: 500px;
}

.form-card h2 {
    margin-bottom: 20px;
    color: #333;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

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

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.availability-list {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.availability-list h2 {
    margin-bottom: 20px;
    color: #333;
}

.availability-entry {
    padding: 15px;
    background: #f9f9f9;
    border-left: 4px solid #667eea;
    border-radius: 4px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Checkbox Toggle Styling */
.checkbox-container {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: 500 !important;
}

.checkbox-container input[type="checkbox"] {
    width: 18px !important;
    height: 18px !important;
    cursor: pointer;
}

/* Context Menu Styling */
.context-menu {
    position: fixed;
    z-index: 1000;
    background: white;
    border: 1px solid #ddd;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 160px;
    padding: 5px 0;
    font-family: inherit;
}

.context-menu-item {
    padding: 10px 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: background 0.2s;
    font-size: 0.9rem;
    color: #333;
}

.context-menu-item:hover {
    background: #f0f2ff;
    color: #667eea;
}

.context-menu-item .icon {
    font-size: 1rem;
}

.entry-info {
    flex: 1;
}

.entry-time {
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.entry-recurrence {
    font-size: 0.9rem;
    color: #666;
}

.entry-actions {
    display: flex;
    gap: 10px;
}

.btn-small {
    padding: 6px 12px;
    font-size: 0.85rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-edit {
    background: #667eea;
    color: white;
}

.btn-edit:hover {
    background: #5568d3;
}

.btn-delete {
    background: #ff6b6b;
    color: white;
}

.btn-delete:hover {
    background: #ff5252;
}

@media (max-width: 768px) {
    .controls {
        flex-direction: column;
    }

    .btn-primary {
        align-self: stretch;
    }

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

    .calendar-wrapper {
        max-height: 600px;
    }

    .availability-slot {
        font-size: 0.7rem;
    }

    .date-header {
        min-width: 100px;
    }

    .entry-actions {
        flex-direction: column;
    }

    .legend-items {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .tabs {
        flex-direction: column;
    }

    .tab-btn {
        padding: 10px 15px;
        font-size: 0.9rem;
    }

    .legend {
        padding: 15px;
    }

    .availability-entry {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .entry-actions {
        align-self: stretch;
    }

    .btn-small {
        flex: 1;
    }
}

/* Band Events */
.availability-slot.band-event-rehearsal {
    background-color: #2ecc71 !important;
    color: white;
    z-index: 1;
}

.availability-slot.band-event-gig {
    background-color: #3498db !important;
    color: white;
    z-index: 1;
}

.availability-slot.band-event-rehearsal .slot-info,
.availability-slot.band-event-gig .slot-info {
    color: white;
}

.event-label {
    font-size: 0.7rem;
    white-space: normal;
    line-height: 1;
    text-align: center;
}

#band-event-form textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
}

.availability-item {
    padding: 15px;
    background: #f9f9f9;
    border-left: 4px solid #667eea;
    border-radius: 4px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.availability-title {
    font-weight: 700;
    margin-bottom: 4px;
}

.availability-time {
    font-size: 0.9rem;
    color: #555;
    margin-bottom: 4px;
}

.availability-desc {
    font-size: 0.85rem;
    color: #777;
    font-style: italic;
}

.btn-danger {
    background-color: #e74c3c;
    color: white;
}

.btn-danger:hover {
    background-color: #c0392b;
}

.form-actions {
    display: flex;
    gap: 10px;
}
