/* Green Management Styles */

/* Calendar view styles for green management */
.calendar-view {
    background: white;
    border-radius: 8px;
    overflow: hidden;
}

.calendar-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.calendar-nav {
    display: flex;
    align-items: center;
    gap: 15px;
}

.view-controls {
    display: flex;
    gap: 5px;
}

.view-btn {
    padding: 8px 12px;
    border: 1px solid #dee2e6;
    background: white;
    color: #495057;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.view-btn:hover {
    background: #f8f9fa;
}

.view-btn.active {
    background: var(--club-primary, #667eea);
    color: white;
    border-color: var(--club-primary, #667eea);
}

.action-controls {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* Day view styles */
.day-view {
    display: grid;
    grid-template-columns: 100px 1fr;
    gap: 0;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    overflow: hidden;
}

.day-times {
    background: #f8f9fa;
    border-right: 1px solid #dee2e6;
}

.day-time-slot {
    padding: 10px;
    text-align: center;
    font-weight: bold;
    font-size: 12px;
    border-bottom: 1px solid #dee2e6;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.day-content {
    display: flex;
    flex-direction: column;
}

.rink-labels {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    background: linear-gradient(135deg, var(--club-primary, #667eea) 0%, var(--club-secondary, #764ba2) 100%);
    border-bottom: 2px solid #dee2e6;
}

.rink-label {
    padding: 10px;
    text-align: center;
    font-weight: bold;
    font-size: 12px;
    color: white;
    border-right: 1px solid rgba(255,255,255,0.2);
}

.day-grid {
    display: flex;
    flex-direction: column;
}

.day-hour {
    border-bottom: 1px solid #dee2e6;
    min-height: 50px;
}

.day-rinks {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    height: 100%;
}

.day-rink {
    padding: 5px;
    border-right: 1px solid #dee2e6;
    cursor: pointer;
    transition: all 0.2s;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    text-align: center;
}

.day-rink.available {
    background: white;
    color: #495057;
    border: 1px solid #e9ecef;
}

.day-rink.available:hover {
    background: #f8f9fa;
}

.day-rink.booked {
    background: #f8d7da;
    color: #721c24;
}

.day-rink.covered {
    background: transparent;
    pointer-events: none;
}

.booking-event {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-size: 10px;
    font-weight: bold;
}

.booking-stretched {
    position: relative;
    z-index: 10;
}

/* Week view styles */
.week-view {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    overflow: hidden;
}

.week-header {
    display: contents;
}

.week-day-header {
    padding: 15px 10px;
    background: linear-gradient(135deg, var(--club-primary, #667eea) 0%, var(--club-secondary, #764ba2) 100%);
    font-weight: bold;
    text-align: center;
    color: white;
    border-bottom: 2px solid #dee2e6;
}

.week-day-column {
    padding: 10px;
    background: white;
    min-height: 200px;
    border-right: 1px solid #dee2e6;
}

.day-setup-info {
    background: #f8f9fa;
    padding: 8px;
    border-radius: 4px;
    margin-bottom: 10px;
    font-size: 12px;
}

.week-booking-event {
    background: #cce5ff;
    padding: 5px;
    margin-bottom: 5px;
    border-radius: 4px;
    font-size: 11px;
    cursor: pointer;
}

.week-booking-event:hover {
    background: #b3d9ff;
}

.no-bookings {
    color: #6c757d;
    font-style: italic;
    text-align: center;
    padding: 20px;
}

/* Month view styles */
.month-view {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    overflow: hidden;
}

.month-day-header {
    padding: 10px;
    background: linear-gradient(135deg, var(--club-primary, #667eea) 0%, var(--club-secondary, #764ba2) 100%);
    font-weight: bold;
    text-align: center;
    color: white;
    border-bottom: 2px solid #dee2e6;
}

.month-day {
    padding: 8px;
    background: white;
    min-height: 80px;
    border-right: 1px solid #dee2e6;
    border-bottom: 1px solid #dee2e6;
    cursor: pointer;
    transition: background-color 0.2s;
}

.month-day:hover {
    background: #f8f9fa;
}

.month-day.other-month {
    background: #f8f9fa;
    color: #6c757d;
}

.month-day.today {
    background: #fff3cd;
    border: 2px solid #ffc107;
}

.month-day-number {
    font-weight: bold;
    margin-bottom: 5px;
}

.availability-indicators {
    display: flex;
    gap: 2px;
    justify-content: center;
}

.availability-period {
    width: 12px;
    height: 12px;
    border-radius: 2px;
    font-size: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
}

.availability-period.available {
    background: #28a745;
}

.availability-period.moderate {
    background: #ffc107;
}

.availability-period.busy {
    background: #dc3545;
}

.day-setup-display {
    background: #e9ecef;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

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

.color-indicator {
    border: 1px solid #dee2e6;
}

.rink-indicator-top {
    padding: 2px 6px;
    border-radius: 3px;
    color: white;
    font-size: 10px;
    font-weight: bold;
    margin-bottom: 3px;
}

.booking-time {
    font-size: 10px;
    color: #6c757d;
}

.booking-title {
    font-size: 11px;
    font-weight: bold;
}

.booking-purpose {
    font-size: 10px;
    margin-bottom: 2px;
}

.booking-user {
    font-size: 9px;
    color: #6c757d;
}

.booking-status {
    font-size: 9px;
    padding: 1px 4px;
    border-radius: 2px;
    margin-top: 2px;
}

.status-confirmed {
    background: #d4edda;
    color: #155724;
}

.status-requested {
    background: #fff3cd;
    color: #856404;
}

.status-rejected {
    background: #f8d7da;
    color: #721c24;
}

/* Modern form controls */
#greenSelector {
    padding: 10px 16px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 14px;
    background: white;
    min-width: 180px;
    font-weight: 500;
    color: #495057;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

#greenSelector:focus {
    border-color: var(--club-primary, #667eea);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    outline: none;
}

#bookRinkBtn {
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

#bookRinkBtn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.4);
}
.settings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 20px;
}

.settings-card {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
}

.settings-card h4 {
    margin: 0 0 15px 0;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 8px;
}

.colour-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.diary-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.diary-nav {
    display: flex;
    align-items: center;
    gap: 15px;
}

.diary-controls {
    display: flex;
    gap: 10px;
}

.rink-diary {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
}

.diary-grid {
    display: flex;
    flex-direction: column;
    border: 1px solid #ddd;
    background: white;
}

.diary-header {
    display: grid;
    grid-template-columns: 120px repeat(7, 1fr);
    background: #e9ecef;
    border-bottom: 2px solid #ddd;
}

.time-row {
    display: grid;
    grid-template-columns: 120px repeat(7, 1fr);
    border-bottom: 1px solid #ddd;
}

.day-slots {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 2px;
    padding: 5px;
    border-right: 1px solid #ddd;
}

.rink-pagination {
    display: none;
    justify-content: center;
    align-items: center;
    gap: 15px;
    padding: 12px 15px;
    background: linear-gradient(135deg, var(--club-primary, #667eea) 0%, var(--club-secondary, #764ba2) 100%);
    border-radius: 8px;
    margin-bottom: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    min-height: 48px;
}

.rink-pagination span {
    color: white;
    font-weight: 600;
    font-size: 14px;
}

.rink-pagination button {
    background: white;
    color: var(--club-primary, #667eea);
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 500;
}

.day-pagination {
    display: none;
    justify-content: center;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 8px;
    margin-bottom: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.day-pagination span {
    color: white;
    font-weight: 600;
    font-size: 14px;
}

.day-pagination button {
    background: white;
    color: #667eea;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 500;
}

.time-column, .day-column, .rink-column {
    background: white;
}

.time-header {
    padding: 15px 10px;
    font-weight: bold;
    text-align: center;
    border-right: 1px solid #ddd;
    background: #e9ecef;
}

.day-header {
    padding: 10px;
    font-weight: bold;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.2s;
    border-right: 1px solid #ddd;
    font-size: 13px;
    background: #e9ecef;
}

.day-header {
    cursor: pointer;
    transition: background-color 0.2s;
}

.day-header:hover {
    background: #e9ecef;
}

.time-slot {
    padding: 20px 10px;
    text-align: center;
    font-size: 12px;
    font-weight: bold;
    background: #f8f9fa;
    border-right: 1px solid #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rink-slot {
    padding: 8px 4px;
    text-align: center;
    cursor: pointer;
    border-radius: 4px;
    min-height: 35px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    transition: all 0.2s;
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.rink-slot.available:hover {
    background: #c3e6cb;
    transform: scale(1.05);
}

.rink-slot.occupied {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.rink-slot.occupied:hover {
    background: #f5c6cb;
}

.game-info {
    font-size: 12px;
    text-align: center;
    font-weight: bold;
}

@media (max-width: 768px) {
    .settings-grid {
        grid-template-columns: 1fr;
    }

    .diary-header {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }

    .diary-nav {
        justify-content: center;
    }

    .diary-controls {
        justify-content: center;
    }

    .diary-header,
    .time-row {
        grid-template-columns: 80px repeat(7, 1fr);
        font-size: 11px;
    }

    .time-slot,
    .day-header {
        padding: 8px 4px;
        font-size: 10px;
    }

    .rink-slot {
        min-height: 25px;
        font-size: 9px;
        padding: 4px 2px;
    }

    .day-slots {
        grid-template-columns: repeat(3, 1fr);
    }

    .rink-pagination {
        display: flex !important;
    }

    .week-view {
        display: block !important;
    }

    .week-header {
        display: flex !important;
        flex-direction: row !important;
        gap: 5px !important;
        overflow-x: auto !important;
        margin-bottom: 15px !important;
    }

    .week-day-header {
        cursor: pointer !important;
        min-width: 60px !important;
        flex: 1 !important;
        padding: 8px 4px !important;
        background: #e9ecef !important;
        color: #495057 !important;
        border-radius: 6px !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        font-size: 11px !important;
        font-weight: 600 !important;
        text-align: center !important;
        transition: all 0.3s !important;
    }

    .week-day-header.expanded {
        background: linear-gradient(135deg, var(--club-primary, #667eea) 0%, var(--club-secondary, #764ba2) 100%) !important;
        color: white !important;
        box-shadow: 0 2px 4px rgba(0,0,0,0.2) !important;
    }

    .week-day-column {
        width: 100% !important;
        display: none !important;
        margin-bottom: 15px !important;
    }

    .week-day-column.active {
        display: block !important;
    }

    .week-day-column .day-setup-info {
        background: #f8f9fa !important;
        padding: 10px !important;
        border-radius: 6px !important;
        margin-bottom: 10px !important;
        font-size: 12px !important;
    }

    .week-view ~ .rink-pagination,
    .month-view ~ .rink-pagination {
        display: none !important;
    }

    body:has(.week-view) .rink-pagination,
    body:has(.month-view) .rink-pagination {
        display: none !important;
    }
}