/**
 * MUDcal Public Calendar Styles
 * Weekly calendar, responsive grid, day columns
 */

/* Calendar Controls */
.mudcal-calendar-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
}

/* Responsive Controls */
.mudcal-responsive-controls {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
    justify-content: space-between;
    max-width: 100%;
}

.mudcal-prev-range,
.mudcal-prev-day {
    order: 1;
}

.mudcal-next-range,
.mudcal-next-day {
    order: 2;
}

.mudcal-current-range-title,
.mudcal-current-day-title {
    order: 3;
    flex: 1;
    text-align: center;
}

.mudcal-current-week-title {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #333;
}

/* Weekly Calendar Grid */
.mudcal-calendar-grid-wrapper {
    overflow-x: auto;
    margin-bottom: 20px;
}

.mudcal-weekly-calendar {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

.mudcal-weekly-calendar thead th {
    background: #f7f7f7;
    padding: 12px 8px;
    border: 1px solid #ddd;
    font-weight: 600;
    text-align: center;
    position: sticky;
    top: 0;
    z-index: 10;
}

.mudcal-time-column {
    width: 80px;
    min-width: 80px;
}

.mudcal-day-column {
    width: 14%;
    min-width: 120px;
}

.mudcal-day-column.past-date .mudcal-day-name,
.mudcal-day-column.past-date .mudcal-day-date {
    color: #999;
    opacity: 0.7;
}

.mudcal-day-name {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
    color: #333;
}

.mudcal-day-date {
    font-size: 12px;
    font-weight: 400;
    color: #777;
}

.mudcal-weekly-calendar tbody td {
    border: 1px solid #e0e0e0;
    padding: 8px;
    vertical-align: top;
    height: 60px;
    position: relative;
}

.mudcal-weekly-calendar tbody td.past-date {
    background-color: #f8f8f8;
    opacity: 0.6;
}

.mudcal-weekly-calendar tbody .mudcal-time-cell {
    background: #fafafa;
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    color: #555;
}

/* Legend */
.mudcal-calendar-legend {
    margin-top: 20px;
    padding: 15px;
    background: #f7f7f7;
    border-radius: 4px;
}

.mudcal-calendar-legend h3 {
    margin-top: 0;
    margin-bottom: 12px;
    font-size: 16px;
    color: #333;
}

.mudcal-legend-items {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.mudcal-legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.mudcal-activity-color {
    display: inline-block;
    width: 20px;
    height: 20px;
    border-radius: 3px;
    flex-shrink: 0;
}

/* Responsive Calendar Controls */
.mudcal-responsive-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding: 15px;
    background: #f7f7f7;
    border-radius: 6px;
}

.mudcal-current-range-title,
.mudcal-current-day-title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
    text-align: center;
    flex: 1;
}

.mudcal-prev-range,
.mudcal-next-range,
.mudcal-prev-day,
.mudcal-next-day {
    font-weight: 600;
    min-width: 120px;
}

/* Desktop Days Grid */
.mudcal-responsive-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    padding: 10px 0;
}

.mudcal-day-column-responsive {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: box-shadow 0.2s;
}

.mudcal-day-column-responsive:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.mudcal-day-column-responsive.past-date {
    opacity: 0.6;
}

.mudcal-day-column-responsive.past-date .mudcal-day-header-responsive {
    background: #8c8f94;
}

.mudcal-day-column-responsive.past-date .mudcal-activity-card-desktop {
    opacity: 0.7;
    cursor: not-allowed;
}

.mudcal-day-header-responsive {
    background: #000000;
    color: #fff;
    padding: 15px;
    text-align: center;
}

.mudcal-day-name-responsive {
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.mudcal-day-date-responsive {
    font-size: 16px;
    font-weight: 400;
}

.mudcal-day-activities {
    padding: 15px;
}

/* Mobile View */
.mudcal-mobile-view {
    display: none;
}

.mudcal-mobile-day-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: #2271b1;
    color: #fff;
    border-radius: 8px 8px 0 0;
    margin-bottom: 0;
}

.mudcal-mobile-activities {
    padding: 15px;
    background: #f9f9f9;
    border-radius: 0 0 8px 8px;
}
