@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap');

*{
    margin:0;
    padding:0;
    box-sizing:border-box;
    font-family:'Inter', sans-serif;
}

::selection {
    background-color: var(--primary-color);
    color: var(--white);
}

html {
    --body-bg: #FAF8FF;
    --sidebar-bg: #f8fafc;
    --header-bg: #fefeff;

    --primary-color: #205179;

    --aside-button-background: #e2e9ee;
    --aside-paragraph: #64748b;
    --aside-button-text: #475569;
    --aside-text: #205179;
    --aside-list-item-active-text: #0f172a;

    --today-date: #0f172a;

    --timetable-header: #191b23;
    --timetable-switch-button-background: #e8edf1;
    --timetable-switch-text: #64748b;
    --timetable-switch-text-active: #205179;

    --timetable-table-header-background: #f8fafc;
    --timetable-table-header-text: #334155;
    --timetable-table-paragraph: #64748b;
    --timetable-table-background: #fefeff;

    --border-color: #e2e8f0;

    --white: #ffffff;
    --black: #000000;
}

html.darkMode {
    --body-bg: #020617;
    --sidebar-bg: #080f1f;
    --header-bg: #0c1427;

    --primary-color: #205179;

    --aside-button-background: #12223a;
    --aside-paragraph: #94a3b8;
    --aside-button-text: #94a3b8;
    --aside-text: #9cabdd;
    --aside-list-item-active-text: #f1f5f9;

    --today-date: #f1f5f9;

    --timetable-header: #f1f5f9;
    --timetable-switch-button-background: #12223a;
    --timetable-switch-text: #94a3b8;
    --timetable-switch-text-active: #b4c5ff;

    --timetable-table-header-background: #1e293b;
    --timetable-table-header-text: #cbd5e1;
    --timetable-table-paragraph: #94a3b8;
    --timetable-table-background: #0f172a;

    --border-color: #334155;

    --white: #0c1427;
    --black: #f1f5f9;
}

body{
    background-color:var(--body-bg);
    display:flex;
    height: 100vh;
    overflow: hidden;
}

aside{
    background-color:var(--sidebar-bg);

    width:18vw;
    min-width:230px;
    max-width:320px;

    min-height:100vh;
    border-right:1px solid var(--border-color);

    height: 100vh;    
    overflow-y: auto; 
    position: sticky; 
    top: 0;

    transition: transform 0.2s ease-in-out;
}

a{
    all: unset;
    cursor: pointer;
}

button {
    all: unset;
    cursor: pointer;
}

.asideHeader{
    font-size:clamp(16px, 1.4vw, 20px);
    margin: 30px;
    margin-bottom: 3px;

    color: var(--aside-text);
}

.asideParagraph {
    font-size: clamp(13px, 1vw, 15px);
    margin: 30px;
    margin-top: 0px;
    margin-bottom: 30px;
    color: var(--aside-paragraph);
}

.asideButtons {    
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px
}

.expandListButton {
    cursor: pointer;

    background-color: transparent;
    color: var(--aside-button-text);

    width: 85%;
    padding: 7px;
    border-radius: 10px;
    font-size: clamp(15px, 1.2vw, 18px);

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 10px;

    transition: 0.2s ease-in-out all;
}

.expandListButton:hover {
    background-color: var(--aside-button-background);
    color: var(--aside-text);
}

.expandListButton.active{
    background-color: var(--aside-button-background);
    color: var(--aside-text);
}

.expandListButton .expandButtonRightSide {
    display: flex;
    transition: 0.15s ease-in-out all;
}

.expandListButton.active .expandButtonRightSide {
    transform: rotate(180deg);
}

.expandButtonLeftSide {
    display: flex;
    align-items: center;
    gap: 10px;
}

.expandedList {
    height: 0px;
    overflow: hidden;
    transition: 0.2s ease-in-out all;

    width: 94%;

    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;

    overflow: auto;
}

.expandedList.active {
    height: 400px;
}

.expandedList.active {
    height: 40vh;
}

.expandedListContainer {
    width: 95%;

    padding-left: 20px;
    padding-right: 5px;

    border-left: var(--border-color) 1px solid;
}

.asideListItem {
    color: var(--aside-button-text);
    border: transparent 1px solid;

    width: 100%;
    font-size: clamp(12px, 0.9vw, 13px);
    height: 35px;
    padding-left: 10px;
    margin-right: 5px;
    margin-bottom: 3px;

    display: flex;
    align-items: center;

    transition: all ease-in-out 0.2s;

    cursor: pointer;
}

.asideListItem:hover {
    background-color: var(--white);
    color: var(--aside-list-item-active-text);
    box-shadow:0 2px 6px rgba(0, 0, 0, 0.04);

    border: var(--border-color) 1px solid;
    border-radius: 10px;
}

.asideListItem.active {
    background-color: var(--white);
    color: var(--aside-list-item-active-text);
    box-shadow:0 2px 6px rgba(0, 0, 0, 0.04);

    border: var(--border-color) 1px solid;
    border-radius: 10px;
}

main {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}

header{
    background-color:var(--header-bg);

    height:6.7vh;
    min-height:70px;
    max-height:120px;
    padding-left: 30px;
    padding-right: 30px;

    border-bottom:1px solid var(--border-color);
	
    box-shadow:0 2px 6px rgba(0, 0, 0, 0.04);

    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
}

.headerContentWrapper {
    display:flex;
    align-items:center;

    height: 100%;
}

.smallHeaderButton {
    color: var(--black);

    height: 35px;
    width: 35px;
    border-radius: 10px;

    display:flex;
    align-items:center;
    justify-content:center;

    cursor:pointer;

    transition: background-color ease-in-out 0.2s;
}

.smallHeaderButton.favoriteButton {
    margin-left: 10px;
}

.smallHeaderButton:hover {
    background-color: var(--aside-button-background);
}

.addFavoriteButton {
    background-color: var(--primary-color);
    color: white;

    height: 60%;
    width: 230px;
    border-radius: 10px;
    font-size: clamp(14px, 1.1vw, 16px);
    font-weight: bold;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-left: 20px;

    cursor: pointer;
}

.todayDate {
    color: var(--today-date);
    font-size: clamp(16px, 1.5vw, 20px);
}

.timetableTableWrapper {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}

.timetableContainer {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    margin: 20px 30px;
}

.timetableHeaderContainer {
    display: flex;
    justify-content: space-between;

    padding-bottom: 15px;
}

.timetableHeader {
    color: var(--timetable-header);

    font-size: clamp(22px, 2.2vw, 32px);
}

.timetableSwitchesOptionsContainer {
    color: var(--timetable-switch-text);

    display: flex;
    align-items: center;

    font-weight: bold;
    font-size: clamp(13px, 1vw, 15px);
}

.timetableSwitchLabel {
    margin-right: 15px;
}

.timetableSwitchesOptionsButtons {
    background-color: var(--white);
    border: 1px solid var(--border-color);

    height: 50px;
    border-radius: 15px;

    display: flex;
    align-items: center;

    box-shadow:0 2px 6px rgba(0, 0, 0, 0.04);
}

.timetableSwitchButton {
    cursor: pointer;
    background-color: transparent;

    height: 40px;
    border-radius: 10px;
    margin: 5px;
    padding-left: 15px;
    padding-right: 15px;

    transition: all ease-in-out 0.1s;
}

.timetableSwitchButton.right {
    margin-left: 0px;
}

.timetableSwitchButton:hover, .timetableSwitchButton.active {
    background-color: var(--timetable-switch-button-background);
    color: var(--timetable-switch-text-active);
}

.timetableMainTable {
    border-collapse: collapse;

    border-radius: 20px;
    width: 100%;
}

.timetableMainTable th {
    background-color: var(--timetable-table-header-background);
    color: var(--timetable-table-header-text);
    padding: 15px;

    border: var(--border-color) 1px solid;
}

.timetableMainTable td {
    background-color: var(--timetable-table-background);

    border: var(--border-color) 1px solid;
    padding: 10px;
}

.tableData {
    padding-bottom: 10px;

    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.tableData:last-child {
    padding-bottom: 0px;
}

.tableDataHeader {
    color: var(--timetable-table-header-text);

    font-size: clamp(12px, 0.9vw, 14px);
    font-weight: bold;
    margin-right: 5px;
}

.tableDataParagraph {
    color: var(--timetable-table-paragraph);
    font-size: clamp(11px, 0.8vw, 12px);
    text-align: center;
}

.tableHour {
    color: var(--black);
    white-space: nowrap;
    text-align: center;
}

.tableHourTime {
    color: var(--timetable-table-paragraph);
    font-size: clamp(9px, 0.8vw, 10px);
    text-align: center;
    font-family: 'Inter', sans-serif;
}

.tableHourHeader {
    color: var(--black);
    font-size: clamp(14px, 0.9vw, 16px);
    font-weight: bold;
    text-align: center;
}

.noWrap {
    white-space: nowrap;
} 

/* === Scrollbar === */

* {
    scrollbar-width: thin;
    scrollbar-color: #bfcfda #e8f0f5;
}

*::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

*::-webkit-scrollbar-track {
    background: #e8f0f5;
    border-radius: 10px;
}

*::-webkit-scrollbar-thumb {
    background-color: #bfcfda;
    border-radius: 10px;
    border: 1px solid #e8f0f5;
}

*::-webkit-scrollbar-thumb:hover {
    background-color: #94afc5;
}

/* Dark mode */

html.darkMode * {
    scrollbar-color: #2d4a6e #0c1a2e;
}

html.darkMode *::-webkit-scrollbar-track {
    background: #0c1a2e;
}

html.darkMode *::-webkit-scrollbar-thumb {
    background-color: #2d4a6e;
    border-color: #0c1a2e;
}

html.darkMode *::-webkit-scrollbar-thumb:hover {
    background-color: #3d6491;
}

/* responsiveness */

.leftSidebar {
    z-index: 999;
}

.leftSidebar.mobile {
    transform: translateX(-100%);
    position: absolute;
}

.leftSidebar.mobile.active {
    transform: translateX(0px);
    position: absolute;
}

.sidebarOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 998;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebarOverlay.active {
    display: block;
    opacity: 1;
}

.burgerButton {
    color: var(--today-date);

    height: 35px;
    width: 35px;
    margin-right:20px;
    border-radius: 10px;

    display: none;
    align-items:center;
    justify-content:center;

    transition: background-color ease-in-out 0.2s;
}

.burgerButton:hover {
    background-color: var(--aside-button-background);
}

.burgerButton.mobile {
    display: flex;
}

/* === Mobile Timetable === */

.mobileTimetableContainer {
    display: none;
    width: 100%;
    overflow: hidden;
}

.mobileDayNav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    width: 100%;
    border-bottom: 1px solid var(--border-color);
    background-color: var(--header-bg);
}

.mobileDayNavCenter {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.mobileDayNavName {
    font-size: clamp(17px, 4vw, 20px);
    font-weight: 600;
    margin: 0;
    color: var(--black);
}

.mobileDayNavDate {
    font-size: clamp(10px, 2.5vw, 11px);
    font-weight: 400;
    letter-spacing: 0.5px;
    color: var(--timetable-table-paragraph);
    margin: 0;
    text-transform: uppercase;
}

.mobileDayNavBtn {
    background: none;
    border: none;
    font-size: clamp(26px, 7vw, 32px);
    line-height: 1;
    cursor: pointer;
    color: var(--primary-color);
    padding: 0 8px;
}

.mobileTimetableWrapper {
    display: flex;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
    transform: translateX(-200%);
}

.mobileTimetableWrapper.noTransition {
    transition: none;
}

.mobileTimetableMainTable {
    min-width: 100%;
    width: 100%;
    flex-shrink: 0;
    padding: 0 15px;
}

/* mobile row - replaces tr */
.mobileTableRow {
    display: flex;
    align-items: flex-start;
    width: 100%;
    margin: 10px 0px;
}

.mobileTableHourCell {
    width: 50px;
    flex-shrink: 0;
}

.mobileTableHourContainer {
    text-align: right;
    padding-right: 15px;
    padding-top: 10px;
}

.mobileTableHourStartTime {
    color: var(--primary-color);
    font-weight: 600;
    font-size: clamp(13px, 3.5vw, 14px);
    letter-spacing: 0.5px;
}
    
.mobileTableHourEndTime {
    color: var(--timetable-table-paragraph);
    font-weight: 400;
    font-size: clamp(10px, 2.8vw, 11px);
}

.mobileTableDataCell {
    flex: 1;
    display: flex;
    gap: 8px;
    min-width: 0;
}

/* both */
.mobileTableDataHeader {
    color: var(--timetable-table-header-text);
}

.mobileTableData.single,
.mobileTableData.multiple {
    box-shadow: -4px 0px var(--primary-color), 0 2px 8px rgba(0, 0, 0, 0.07);
}

/* SINGLE */
.mobileTableData.single {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex: 1;
    background-color: var(--timetable-table-background);
    padding: 12px 14px;
    margin: 5px 0;
    border-radius: 7px;
}

.mobileTableDataLeftSection.single {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.headerGroupSection {
    display: flex;
    align-items: center;
    gap: 5px;
}

.mobileTableDataHeader.single {
    font-size: clamp(15px, 4vw, 16px);
    font-weight: 600;
    margin: 0;
}

.mobileTableDataGroup.single {
    font-size: clamp(11px, 3vw, 12px);
    font-weight: 400;
    color: var(--timetable-table-paragraph);
    margin: 0;
}

.mobileTableDataTeacher.single {
    font-size: clamp(11px, 3vw, 12px);
    font-weight: 400;
    color: var(--timetable-table-paragraph);
    margin: 0;
}

.mobileTableDataRightSection.single {
    display: flex;
    align-items: center;
}

.mobileTableDataClassroom.single {
    font-size: clamp(11px, 3vw, 12px);
    font-weight: 400;
    color: var(--timetable-table-paragraph);
    margin: 0;
}

/* MULTIPLE */
.mobileTableData.multiple {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex: 1;
    background-color: var(--timetable-table-background);
    padding: 10px 12px;
    margin: 5px 0;
    border-radius: 7px;
}

.mobileTableDataGroup.multiple {
    font-size: clamp(10px, 2.8vw, 11px);
    font-weight: 400;
    color: var(--timetable-table-paragraph);
    margin: 0 0 2px 0;
}

.mobileTableDataHeader.multiple {
    font-size: clamp(12px, 3.2vw, 13px);
    font-weight: 600;
    margin: 0 0 2px 0;
}

.mobileTableDataTeacher.multiple {
    font-size: clamp(10px, 2.8vw, 11px);
    font-weight: 400;
    color: var(--timetable-table-paragraph);
    margin: 0;
}

.mobileTableDataClassroom.multiple {
    font-size: clamp(10px, 2.8vw, 11px);
    font-weight: 400;
    color: var(--timetable-table-paragraph);
    margin: 4px 0 0 0;
}

.mobileTimetableScrollBuffer {
    height: 100px;
    display: block;
}

/* === Responsive toggles === */

.mobileTimetableContainer.mobile {
    display: block;
}

.timetableMainTable.mobile {
    display: none;
}

.timetableSwitchesOptionsContainer.mobile {
    display: none;
}

.todayDate.mobile {
    display: none;
}

.mobileAddFavoriteButton {
    color: red;
}

.timetableHeaderMobile {
    display: none;
    color: var(--timetable-header);
    font-size: clamp(14px, 3.8vw, 15px);
}

.timetableContainer.mobile {
    margin: 0px;
}

.timetableHeaderContainer.mobile {
    padding-bottom: 0px;
}