.schedule-table-header {
    overflow: hidden;
}

.schedule-table-header-grid {
    display: grid;
    grid-template-columns: 40px repeat(7, minmax(160px, 1fr));
    gap: 0;
    margin: 0 auto;
    max-width: 1800px;
    padding: 0 10px;
    border-left: 1px solid transparent;
    border-right: 1px solid transparent;
    box-sizing: border-box;
}

.schedule-table-header-grid .schedule-header-cell:first-child {
    border-right: 1px solid rgba(15, 23, 42, 0.06);
}

.schedule-table-header-grid .schedule-header-cell:last-child {
    border-right: 1px solid rgba(15, 23, 42, 0.06);
}

.schedule-grid {
    display: grid;
    grid-template-columns: 40px repeat(7, minmax(160px, 1fr));
    grid-template-rows: repeat(2161, 1px);
    gap: 0;
    position: relative;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    padding: 20px 10px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    margin: 0 auto;
    box-sizing: border-box;
}
.schedule-lesson-card {
    background: #e9f2ff !important;
    border-left: 3px solid #2563eb !important;
    border-radius: 4px;
    padding: 10px 6px; /* Narrower left/right padding to shift content slightly left */
    margin: 0; /* Remove margins for precise alignment */
    width: 100%;
    box-sizing: border-box;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 10px;
    font-size: 12px !important;
    overflow: hidden;
    transition: all 0.2s ease;
    cursor: pointer;
    z-index: 10;
}

.schedule-lesson-card * {
    font-size: 12px !important;
    line-height: 1.2 !important;
    text-transform: none !important;
}

.schedule-lesson-card div,
.schedule-lesson-card span {
    font-weight: 600 !important;
}

.schedule-lesson-card i {
    font-weight: 900 !important; /* Force solid style for FontAwesome */
    color: #000 !important; /* Explicit black color */
}

.schedule-lesson-card::before {
    display: none !important;
}

.schedule-lesson-class {
    color: #0f172a;
    margin: 0;
}

.schedule-lesson-subject {
    color: #0f172a;
    margin: 0;
}

.schedule-lesson-teacher {
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: auto;
    padding-top: 0;
    font-size: 8px !important;
}

.schedule-lesson-teacher i {
    color: #0f172a;
    font-size: 10px !important;
}

/* Disable page-level scrolling on the Schedule tab */
html[data-page=\"schedule\"] .main-content {
    overflow: hidden !important;
}

/* Custom Selects Style for Schedule Filters in blue zone */
select.schedule-pill {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='rgba%28255, 255, 255, 0.8%29' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 12px;
    padding-right: 32px !important;
    padding-left: 16px !important;
    height: 34px;
    line-height: 32px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    background-color: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.95);
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    outline: none;
    box-sizing: border-box;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}
select.schedule-pill:hover {
    background-color: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.28);
}
select.schedule-pill option {
    color: #0f172a;
    background-color: #ffffff;
}

/* White Card Header Layout - centered grid */
.schedule-card-header {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: 8px 12px;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
    background: #ffffff;
}
.schedule-period-wrapper {
    display: flex;
    justify-content: flex-end;
}

/* Oggi Today Button Styling */
.schedule-today-header-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto !important;
    margin: 0 !important;
    justify-self: start !important;
    height: 28px;
    padding: 0 10px;
    font-size: 11px;
    font-weight: 700;
    color: #1c77ff;
    background: #ffffff;
    border: 1.2px solid #1c77ff;
    border-radius: 999px;
    cursor: pointer;
    box-sizing: border-box;
    transition: all 0.15s ease;
    white-space: nowrap;
    box-shadow: none;
}
.schedule-today-header-btn:hover {
    background: rgba(28, 119, 255, 0.05);
}
.schedule-today-header-btn.active {
    border-width: 2px;
    font-weight: 800;
    background: #ffffff;
    color: #1c77ff;
    cursor: default;
}

/* Date Display and Navigation */
.schedule-date-display {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 800;
    color: #0f172a;
    user-select: none;
    padding: 6px 12px;
    border-radius: 999px;
    transition: background 0.15s ease;
}
.schedule-date-display:hover {
    background: rgba(15, 23, 42, 0.05);
}
.schedule-nav-arrow-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #1c77ff;
    padding: 6px 10px;
    font-size: 14px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease;
}
.schedule-nav-arrow-btn:hover {
    background: rgba(28, 119, 255, 0.08);
}

/* Period Switcher Select (right side of card header) */
.schedule-period-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='rgba%2815, 23, 42, 0.7%29' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 10px;
    padding-right: 28px !important;
    padding-left: 14px !important;
    height: 34px;
    line-height: 32px;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 999px;
    font-weight: 700;
    font-size: 13px;
    color: #0f172a;
    background-color: #ffffff;
    cursor: pointer;
    box-sizing: border-box;
    outline: none;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}
.schedule-period-select:hover {
    background-color: rgba(15, 23, 42, 0.02);
    border-color: rgba(15, 23, 42, 0.2);
}

/* Weekday header column stack layout and colors */
.schedule-header-cell {
    padding: 4px 8px !important;
    min-height: 44px !important;
}
.schedule-day-title {
    font-size: 12px;
    color: rgba(15, 23, 42, 0.55);
    font-weight: 800;
    text-transform: none;
    display: flex;
    flex-direction: column !important;
    align-items: center;
    gap: 2px !important;
}
.schedule-day-title .dow-label {
    font-size: 12px;
    font-weight: 900;
    color: rgba(15, 23, 42, 0.75);
    transition: color 0.15s ease;
}
.schedule-day-title.is-today .dow-label {
    color: #1c77ff !important;
}
.schedule-date-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 22px;
    padding: 0 10px;
    border-radius: 999px;
    background: transparent !important;
    color: #0f172a !important;
    font-weight: 800;
    font-size: 12px;
    width: max-content;
    transition: all 0.15s ease;
}
.schedule-date-pill.is-today {
    background: #1c77ff !important;
    color: #ffffff !important;
}

/* Increase width of dropdown selectors */
#schedule-view-mode.schedule-pill {
    min-width: 140px !important;
}
#schedule-view-value.schedule-pill {
    min-width: 180px !important;
}
