* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

button {
    outline-color: transparent;
    border-color: transparent;
    background: transparent;
    color: inherit;
    font-size: inherit;
}

:root {
    --min: min(1vw, 1vh);
    --mid: calc(0.5vw + 0.5vh);
    --max: max(1vw, 1vh);
}

html, body, #app {
    width: 100vw;
    height: 100vh;
    overflow: hidden;
}

#app {
    background: #333;
    color: #eee;
    font-size: calc(3 * var(--mid));
    font-weight: 400;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif;
}

header {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 100vw;
    height: calc(14 * var(--mid));
}

header .table-count {
    background: #0905;
    /* width: calc(45 * var(--mid)); */
    width: 100%;
    height: calc(7 * var(--mid));
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 calc(3 * var(--mid));
}

header .table-count span.table-counter {
    display: flex;
    justify-content: center;
    /* background: #000; */
    width: 25%;
}

header nav {
    /* width: calc(55 * var(--mid)); */
    width: 100%;
    height: calc(7 * var(--mid));
    /* background: rgb(0, 154, 149); */
    display: flex;
    justify-content: space-between;
    /* padding: 0 calc(1 * var(--mid)); */
    padding: 0 calc(3 * var(--mid));
    align-items: center;
    cursor: default;
    user-select: none;
}

header nav button {
    width: 100%;
    height: 100%;
    /* background: #6e0096; */
    cursor: pointer;
    transition: .3s;
}

header nav button:hover {
    background: #0907;
}

header nav button:active {
    background: #0909;
}

/* .app-body-container {
    background: rgb(124, 2, 2);
    width: 100vw;
    height: calc(100vh - 7 * var(--mid));
    display: flex;
    padding: var(--min);
    gap: var(--min);
} */

.select-area {
    /* background: rgba(255, 0, 0, 0.27); */
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: var(--max);
    transition: .3s;
    overflow: auto;
    min-height: 0px;
    /* max-height: 0px;
    height: 0px; */

    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

.select-area::-webkit-scrollbar {
/* Hide scrollbar for Chrome, Safari and Opera */
    display: none;
}

.select-area.open {
    min-height: calc(100vh - 14 * var(--mid));
}

.select-hour-area,
.select-subject-area {
    width: 100%;
    display: flex;
    flex-direction: column;
    user-select: none;
}

.select-hour-area .select-status,
.select-subject-area .select-status {
    width: 100%;
    display: flex;
    justify-content: space-evenly;
    align-items: center;
    height: calc(7 * var(--mid));
}


.select-hour-area .select-status span,
.select-subject-area .select-status span {
    width: 35%;
    display: flex;
    justify-content: center;
    align-items: center;
    height: calc(7 * var(--mid));
    cursor: pointer;
}

.required {
    background: #07f5;
}

.allowed {
    background: #0f75;
}

.excepted {
    background: #f335;
}

.select-hour-area .hour-count,
.select-subject-area .subject-name {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    height: calc(7 * var(--mid));
}

.option-name {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: calc(5 * var(--max));
    padding: 0 calc(7 * var(--max));
    height: calc(7 * var(--mid));
}

.table-list {
    width: calc(100%);
    /* background: rgb(88, 88, 0); */
    overflow-x: hidden;
    overflow-x: scroll;
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
    display: flex;
    flex-direction: column;
}

.table-list::-webkit-scrollbar {
    /* Hide scrollbar for Chrome, Safari and Opera */
    display: none;
}

.table-list-button {
    display: flex;
    /* justify-content: space-between; */
    flex-direction: column;
    align-items: center;
    /* min-height: calc(10 * var(--mid)); */
    background: #0953;
    /* cursor: pointer; */
    transition: 0.3s;
    border-bottom: 1px solid #777;
    user-select: none;
}

/* .table-list-button:hover {
    background: #0957;
}

.table-list-button:active {
    background: #095b;
} */
.table-header {
    width: 100%;
    min-height: calc(10 * var(--mid));
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 calc(3 * var(--mid));
}

.table-header span {
    width: 25%;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(10 * var(--mid));
}

.table-header-index, .table-header-subjects {
    cursor: pointer;
}

.table-header-index:hover, .table-header-index:active,
.table-header-subjects:hover, .table-header-subjects:active {
    background: #0f03;
}

.table-area {
    width: 100%;
    display: flex;
    flex-direction: column;
}

.table-body {
    width: 100%;
    height: 100%;
    background: rgb(38, 1, 125);
    display: flex;
}

.table-body-column {
    background: #333;
    height: 100%;
    width: 17%;
    position: relative;
}

.table-cell {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: calc(7 * var(--mid));
    font-size: calc(2.7 * var(--mid)) !important; /* why need important? */
    /* border: 2px dotted rgb(1, 1, 104); */
}

#table-body-column .day-lesson-shadow  {
    position: absolute;
    top: 0;
    width: 100%;
}

#table-body-hours .table-cell {
    border-bottom: 1px solid #aaa;
}

.table-hour-cell {
    border-bottom: 1px solid #aaa;
}

.select-cell {
    box-shadow: inset 0 0 0 calc(0.5 * var(--min)) #333;
}

.select-lesson-popup {
    position: absolute;
    background: #333;
    border: 1px solid #def;
    font-size: calc(5 * var(--mid));
    width: 70%;
    top: 10%;
    left: 15%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10%;
    gap: calc(7 * var(--mid));
}

.select-lesson-title {
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: calc(2 * var(--mid));
}

.select-lesson-body {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: calc(3 * var(--mid));
}

.select-lesson-body span {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    gap: calc(3 * var(--mid));
    padding: calc(2 * var(--mid));
}

.initial-subject-list {
    position: absolute;
    width: 90%;
    height: 80%;
    top: 14%;
    left: 5%;
    display: flex;
    flex-direction: column;
    gap: var(--max);
    padding: var(--max);
    border: 1px solid #def;
    font-size: calc(3.5 * var(--mid));
    overflow: auto;
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

.initial-subject-list::-webkit-scrollbar {
    /* Hide scrollbar for Chrome, Safari and Opera */
    display: none;
}

.initial-subject-list .select-subject-area {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: var(--max);
    /* border: 1px solid #def; */
}