/* Schedule Page - Calendar View */

/* Override main-content when schedule is active */
body.schedule-page-active .main-content {
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.schedule-page-content {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
    min-height: 0;
}

.schedule-calendar {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
    min-height: 0;
}

/* Day Tabs */
.schedule-day-tabs {
    display: flex;
    background: var(--top-bar-bg);
    flex-shrink: 0;
}

.schedule-day-tab {
    flex: 1;
    padding: 8px 4px 10px;
    background: transparent;
    color: rgba(255, 255, 255, 0.7);
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
    transition: all 0.2s ease;
}

.schedule-day-tab.active {
    color: #fff;
    border-bottom-color: var(--primary-color);
    background: rgba(255, 255, 255, 0.08);
}

.schedule-day-name {
    font-size: 10px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.schedule-day-number {
    font-size: 20px;
    font-weight: 400;
    line-height: 1.1;
}

.schedule-day-tab.active .schedule-day-number {
    font-weight: 700;
}

.schedule-day-count {
    font-size: 9px;
    opacity: 0.7;
}

/* Toolbar */
.schedule-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: #fff;
    border-bottom: 1px solid #e0e0e0;
    flex-shrink: 0;
}

.schedule-toolbar-date {
    font-size: 13px;
    font-weight: 500;
    color: #333;
}

.schedule-toolbar-actions {
    display: flex;
    gap: 6px;
}

.schedule-toolbar-actions .btn {
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 6px;
}

.schedule-toolbar-actions .btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}

/* Type Filter */
.schedule-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px 12px;
    border-bottom: 1px solid #e0e0e0;
    background: #fafafa;
    flex-shrink: 0;
}

.schedule-filter-chip {
    padding: 3px 10px;
    border-radius: 14px;
    border: 1.5px solid #ddd;
    background: #fff;
    color: #999;
    font-size: 11px;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.15s;
    text-transform: capitalize;
}

.schedule-filter-chip.active {
    font-weight: 600;
}

.schedule-filter-chip i {
    font-size: 10px;
}

/* Grid Wrapper - the only scrollable area */
.schedule-grid-wrapper {
    flex: 1;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    position: relative;
    min-height: 0;
    background: #fff;
}

/* Room Headers */
.schedule-room-headers {
    position: sticky;
    top: 0;
    z-index: 15;
    display: flex;
    background: #fff;
    border-bottom: 2px solid #e0e0e0;
}

.schedule-time-gutter-header {
    width: 48px;
    min-width: 48px;
    border-right: 1px solid #eee;
}

.schedule-room-header {
    flex: 1;
    min-width: 110px;
    padding: 8px 4px;
    font-size: 11px;
    font-weight: 600;
    color: #333;
    text-align: center;
    border-right: 1px solid #eee;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    background: #f8f9fa;
}

/* Grid */
.schedule-grid {
    display: flex;
    position: relative;
    min-height: 100%;
}

/* Time Gutter */
.schedule-time-gutter {
    width: 48px;
    min-width: 48px;
    position: relative;
    border-right: 1px solid #eee;
    flex-shrink: 0;
}

.schedule-time-label {
    position: absolute;
    right: 6px;
    font-size: 10px;
    color: #999;
    font-weight: 500;
    line-height: 1;
    transform: translateY(-6px);
    font-variant-numeric: tabular-nums;
}

/* Grid Lines */
.schedule-grid-lines {
    position: absolute;
    left: 48px;
    right: 0;
    top: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 0;
}

.schedule-hour-line {
    position: absolute;
    left: 0;
    right: 0;
    border-top: 1px solid #f0f0f0;
}

.schedule-half-line {
    position: absolute;
    left: 0;
    right: 0;
    border-top: 1px dashed #f8f8f8;
}

/* Room Columns */
.schedule-columns {
    flex: 1;
    display: flex;
    position: relative;
}

.schedule-room-column {
    flex: 1;
    min-width: 110px;
    position: relative;
    border-right: 1px solid #f0f0f0;
}

/* Timeline Column */
.schedule-timeline {
    flex: 1;
    position: relative;
}

/* Event Blocks */
.schedule-block {
    transition: box-shadow 0.15s, transform 0.1s;
}

.schedule-block:hover,
.schedule-block:active {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
    z-index: 10 !important;
    transform: scale(1.01);
}

.schedule-block-title {
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.schedule-block-title-tiny {
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.schedule-block-subtitle {
    font-size: 10px;
    opacity: 0.8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.schedule-block-time {
    font-size: 10px;
    opacity: 0.7;
    margin-top: auto;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Modal styling */
.schedule-modal-header {
    padding-bottom: 12px;
}

.schedule-modal-header .modal-title {
    font-size: 18px;
    letter-spacing: -0.3px;
}

.schedule-type-badge {
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: capitalize;
    display: inline-block;
}

/* Loading & Error States */
.schedule-page-content .loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    flex: 1;
}

.schedule-page-content .no-ticket {
    text-align: center;
    padding: 60px 20px;
    color: #999;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.schedule-page-content .no-ticket i {
    color: #ddd;
}

.schedule-page-content .no-ticket h3 {
    color: #666;
}

/* Responsive */
@media (max-width: 360px) {
    .schedule-room-header {
        min-width: 90px;
        font-size: 9px;
        padding: 4px 2px;
    }
    .schedule-room-column {
        min-width: 90px;
    }
    .schedule-day-number {
        font-size: 18px;
    }
    .schedule-time-gutter,
    .schedule-time-gutter-header {
        width: 40px;
        min-width: 40px;
    }
    .schedule-time-label {
        font-size: 9px;
    }
}
