body {
    font-family: "Titillium Web", serif;
    margin: 0;
    padding: 0;
    background-color: #FFF;
    opacity: 0; 
    animation: fadeIn 0.7s ease-in-out forwards; 

}

/* HEADER */

.slim-header {
    background-image: url('/static/img/gradient_web 1.png');
    background-size: cover; 
    width: 100%;
    background-position: center 60%; 
    -webkit-user-select: none; 
    -ms-user-select: none; 
    user-select: none; 
    opacity: 0;
    display: flex;
    height: 2.3rem;
    animation: fadeIn 0.7s ease-in-out forwards;
}
.link-container {
    margin-left: 10px;
    display: flex;
    justify-content: left;
    align-items: center;
    width: fit-content;
    box-sizing: border-box;
}

.slim-header a {
    padding: 0 1em;
    font-size: 0.8rem;
    cursor: pointer;
    color: white;
    transition: 0.1s;
}

.slim-header a:hover {
    color: #00957d;
    transition: 0.1s;
}

.bi-arrow-left-circle {
    
    font-size: 1rem; 
    display: inline-block;
    transition: transform 0.3s ease;
}

.back:hover .bi-arrow-left-circle {
    transform: translateX(-5px);
    transition: transform 0.3s ease;
}

/* CONTAINER LAYOUT */

.container-delux {
    display: flex;
    flex-direction: column;
    height: calc(100svh - 2.3rem);
    box-sizing: border-box;
    padding: clamp(0.55rem, 4vw - 2rem, 1.65rem); 
    gap: clamp(0.55rem, 4vw - 1rem, 1.32rem);
}

.section {
    box-sizing: border-box;
    flex: 1;
}

.top {
    opacity: 0; 
    animation: 0.5s fadeIn 0s ease-in-out forwards;
    flex: 1.25;
    display: flex;
    gap: clamp(0.55rem, 3vw - 1rem, 1.5rem);
    flex-wrap: wrap;
    -webkit-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.mid {
    opacity: 0;
    animation: 0.5s fadeIn 0.2s ease-in-out forwards;
    flex: 0.1;
    display: flex;
    justify-content: space-between;
    align-content: center;
    -webkit-user-select: none;
    -ms-user-select: none;
    user-select: none;
    z-index: 2;
}

.bot {
    opacity: 0;
    animation: 0.5s fadeIn 0.4s ease-in-out forwards;
    flex: 1;
    display: flex;
    gap: clamp(0.555rem, 3vw - 1rem, 1.5rem);
    display: flex;
    z-index: 1;
    min-height: 80px;
}

.top > div,
.mid > div,
.bot > div {
    box-sizing: border-box;
}

/* TOP LAYOUT */

.planner {
    flex: 1;
    overflow-x: auto;
    overflow-y: auto;
    scrollbar-width: none;
    border-radius: 20px;
    border: 1.5px solid #D6D6D6;
    box-shadow: 0px 4.907px 15.458px 0px rgba(0, 0, 0, 0.15);
}

.planner-controls {
    flex: 0.02;
    min-width: 1.5rem;
}

.pcontrols-container {
    height: fit-content;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: clamp(0.7rem, 4vw - 1rem, 0.4rem);
}

.header-controls {
        display: none;
}

.standalone-controls {
        display: flex;
}

/* TABLE */

table {
    table-layout: fixed;
    width: 100%;
    border-collapse: collapse;
    height: auto;
    min-height: 100%;
}

th, td {
    border-left: 1px solid #D6D6D6;
    vertical-align: top;
    width: 12.5%;
    background-color: #F6F6F6;
    
}

td {
    padding: 5.5px; 
}

th {
    padding: 15px 0 10px 0;
    color: #000;
    font-size: clamp(0.66rem, 1.98vw - 0.55rem, 1.1rem);
    font-style: normal;
    font-weight: 600;
    line-height: normal;
    text-transform: uppercase;
    position: sticky;
    top: 0;
    z-index: 1; 

}

td.erasmus-semester,
th.erasmus-semester {
    background-color: #e6f2ff !important;
}

.credit-counter {
    padding: 5px;
    box-sizing: border-box;
    color: #000;
    font-style: normal;
    font-weight: 700;
    line-height: normal;
    background-color: #FFF;
}   

.SC-credit-counter-container {
    display: flex;
    width: 100%;
    justify-content:space-between;
    align-items: center;
}

.erasmus-toggle {   
    border-radius: 50%;
    border: 0;
    width: 2em;
    height: 2em;
    font-size: 0.75rem;
    background-color: #cecece;
    display: flex;
    justify-content:center;
    align-items:center;
    margin-left: 0.3rem;
    transition: all 0.3s ease;
    padding: 0;
}

.erasmus-toggle img {
    height: 100%; 
    filter: invert(1);
}

.erasmus-toggle:hover {
    background-color: #868686;
    transition: all 0.3s ease;
    cursor: pointer;
}

.erasmus-toggle.active {
    background-color: #0062AD;;
}

.SC-credit-label {
    color: black;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
}

.SC-credit-counter {
    border-radius: 50%;
    min-width: 2em;
    height: 2em;
    font-size: 0.75rem;
    font-weight: 600;
    background-color: #E50000;
    display: inline-flex;
    justify-content:center;
    align-items:center;
    color: #FFF;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.SC-credit-counter.credits-optimal {
    background-color: #00957d;
}

.SC-credit-counter.credits-okay {
    background-color: #FFAE00;
}

.SC-credit-counter.credits-insufficient {
    background-color: #E50000;
}

.counter.credits-optimal {
    color: #00957d;
    font-weight: bold;
}

.counter.credits-insufficient,
.counter.credits-okay {
    color: #DE5900;
    font-weight: normal;
}

tbody tr:last-child {
    border-top: 1px solid #D6D6D6;
}

th:first-child, td:first-child {
    border-left: none;
}

.semester-column {
    height: 100%;
    overflow-y: visible;
    position: relative;
    min-height: 250px;
}

.semester-icon {
    display: flex;
    height: 0.9em;
    width: 0.7em;
    padding: 3px;
    justify-content: center;
    align-items: flex-end;
    border-radius: 0px 0px 4.907px 4.907px;
    position: absolute;
    margin-top: -15px;
    margin-left: 17px;
}

.semester-icon.winter{
    background-color: #0062AD;
}

.semester-icon.summer {
    background-color:  #FFAE00;
}

.semester-icon img {
    width: 98%;
}

.control-button {
    width: 100%;
    border: none;
    background: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    opacity: .8;
    transition: 0.3s ease;
}

.control-button:hover {
    opacity: 1;
    transform: scale(105%);
    transition: 0.3s ease;
}

.button-icon {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
}

.show-semester-button path,
.show-semester-button circle,
.hide-semester-button path {
    fill: #00957d;
}

/* NOTE MID LAYOUT */

.filters {
    display: flex;
    align-items: center;
    box-sizing: border-box;
    flex: 1;
    max-height: 2.2rem;
    min-width: 45rem;
    gap: 1rem;
}

.stats {
    display: flex;
    box-sizing: border-box;
    justify-content: space-evenly;
    border-radius: 2rem;
    flex: 1;
    max-width: 45rem;
    min-width: 41rem;
    max-height: 2.2rem;
    font-size: 0.8rem;
    box-shadow: 0px 4.907px 15.458px 0px rgba(0, 0, 0, 0.15);
    margin-left: 0;
}

/* Search */
.search-bar-container {
    box-sizing: border-box;
    height: 100%;
    width: 11rem;
    padding: 0.3rem;
    border-radius: 15rem;
    border: 0.1rem solid #D6D6D6;
    background: #F6F6F6;
    display: flex;
    transition: 0.3s ease;
}

.search-bar-container:hover {
    box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.10);
    transition: 0.3s ease;
}

#search-bar {
    width: 100%;
    border: 0;
    background: none;
    font-size: 0.88rem;
    font-family: "Titillium Web", serif;
    margin-left: 0.1em;
}

.search-bar-container img {
    width: 1em;
    margin-left: 0.2em;
}

#search-bar:focus {
    outline: none;
    border: none;
}

.search-clear-button {
    background: none;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    color: #555;
    font-size: 0.88rem; 
    transition: 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-clear-button svg {
    width: .6em;
    height: .6em;
    padding: 0;
    fill: #858585;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-clear-button:hover {
    color: #555;
    background-color: rgba(0, 0, 0, 0.05);
}

.search-clear-button:hover.search-clear-button svg {
    fill: #0062AD;
    transition: 0.2s ease;
}

/* Dropdowns */

.dropdown {
    box-sizing: border-box;
    font-size: 11px;
    background: #0062AD;
    border: 1px solid #0062AD;
    border-radius: 50px;
    cursor: pointer;
    height: 100%;
    width: 9rem;
    padding: 4px;
    position: relative;
    color: white;
    z-index: 5;
    transition: 0.2s ease;
    display: flex;
}

.dropbtn {
    justify-content: space-between;
    display: flex;
    align-items: center;
    color: #fff;
    font-size: 11px;
    background: none;
    border: none;
    width: 100%;
    padding: 0 12px;
    position: relative;
    cursor: pointer;
}

.arrow-icon {
    transition: transform 0.3s ease;
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid #fff; 
    margin-left: 8px; 
    display: inline-block; 
    min-width: 10px;
    min-height: 5px; 
}

.dropbtn::after {
    content: "";
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid #fff;
    display: inline-block;
    margin-left: 8px;
    transition: transform 0.3s ease;
}

.dropdown:hover .arrow-icon,
.dropdown:hover .dropbtn::after {
    transform: rotate(180deg);
}

.dropbtn:has(.arrow-icon)::after {
 display: none;
}


.dropdown-content {
    box-sizing: border-box;
    margin-left: -4px;
    display: none;
    position: absolute;
    top: 100%; 
    background-color: #fff;
    border-radius: 0 0 10px 10px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
    width: 100%;
    z-index: 1;
}

.dropdown-content label {
    color: #000;
    font-size: 11px;
    padding: 5px;
    display: block;
    cursor: pointer;
}

.dropdown-content label:hover {
    background-color: #f1f1f1;
}

.dropdown-content label:last-child:hover {
    background-color: #f1f1f1;
    border-radius: 0 0 10px 10px;
}

.dropdown-content label input {
    display: none;
}

.dropdown:hover .dropdown-content {
    display: block;
}


.dropdown:hover {
    transition: 0.2s ease;
    border-radius: 10px 10px 0 0;
    scale: 102%;
}


.show-available {
    height: 100%;
}


.show-available label,
.stats-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    height: 100%;
    font-size: 11px;
    padding: 0.6rem;
    border-radius: 20px;
    background: #333333;
    color: #fff; 
    cursor: pointer;
    transition: 0.3s ease;
    font-family: "Titillium Web", serif;
    font-weight: 600;
    position: relative;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border: none;
}

.stats-toggle {
    width: 5rem;
    display: none;
}

.show-available label {
    width: 10rem;
}

.show-available input[type="checkbox"] {
    display: none; 
}

.show-available input[type="checkbox"]:not(:checked) + label,
.stats-toggle:not(.active) {
    background: #ffffff;
    color: #555555;
    border: 1px solid #ddd;
}

.show-available input[type="checkbox"]:checked + label::before,
.stats-toggle.active::before {
    content: "✓";
    margin-right: 6px;
    font-weight: bold;
}

.show-available label:hover,
.stats-toggle:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 6px rgba(0,0,0,0.15);
    transition: 0.2s ease;
}

.show-available label:active,
.stats-toggle:active {
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.show-available input[type="checkbox"]:checked + label,
.stats-toggle.active {
    border: none;
    outline: none;
}

/* STATS */

.stats div {
    display: flex;
    align-items: center;
}

.c-label {
    color: #0062AD;
    font-family: "Titillium Web";
    font-style: normal;
    font-weight: 600;
    line-height: normal;
}

.counter {
    padding-left: 0.5rem;
    border-right: 1px solid #D6D6D6;
    padding-right: 0.5rem;
}

.all-credits .counter {
    border-right: 0;
    padding-right: 0;
}


.circle {
    display: inline-block;
    width: 0.65rem;
    height: 0.65rem;
    border-radius: 50%;
    margin-right: 0.4rem;
}

.oP-circle {
    background-color: #0062AD;
}

.oV-circle {
    background-color: #8A00AD;
}

.oJ1-circle {
    background-color: #DE5900;
}

.oJ-circle {
    background-color: #DE5900;
}

.cTVS1-circle {
    background-color: #00A189;
}

.oSZ-circle {
    background-color: #000000;
}

.class-pool {
    flex: 4.3;
    min-width: 240px;
    display: flex;
    position: relative;
}

.info-box-container {
    flex: 1;
    box-sizing: border-box;
    min-width: 20rem;
    padding: 15px;
    border-radius: 21px;
    box-shadow: 0px 4px 12.6px 0px rgba(0, 0, 0, 0.15);
    overflow-y: auto; 
    scrollbar-width: none;
    font-size: 10px;
    -webkit-user-select: text; 
    -ms-user-select: text; 
    user-select: text; 
    max-height: 100%;
    position: relative;
    display: flex;
    flex-direction: column;
    background: linear-gradient(white 60%, rgba(255, 255, 255, 0)), 
                linear-gradient(rgba(255, 255, 255, 0), white 60%) 0 100%, 
                linear-gradient(to bottom, rgba(0, 0, 0, 0.216), rgba(0, 0, 0, 0)), 
                linear-gradient(to top, rgba(0, 0, 0, 0.216), rgba(0, 0, 0, 0)) 0 100%;
    background-size: 100% 60px, 100% 60px, 100% 20px, 100% 20px;
    background-repeat: no-repeat;
    background-color: white;
    background-attachment: local, local, scroll, scroll;
}

.info-box-container:has(:nth-child(n+2)) {
    outline: 1px solid #D6D6D6;
}

.available-classes {
    box-sizing: border-box;
    display: flex;
    align-content: flex-start;
    flex-wrap: wrap;
    justify-content: flex-start;
    align-self: flex-start;
    padding: 0.5em;
    border-radius: 20px;
    background-color: #F6F6F6;
    height: 100%;
    width: 100%;
    overflow-y: auto;   
    -webkit-user-select: none;
    -ms-user-select: none;
    user-select: none;
    position: relative; 
    scrollbar-width: none;
}

.shadow-div {
    box-sizing: border-box;
    border-radius: 20px;
    box-shadow: 0px 4.108px 40.567px 0px rgba(0, 0, 0, 0.10) inset;
    height: 100%;
    width: 100%;
    position: absolute; 
    top: 0;
    left: 0;
    pointer-events: none;
}  

*::-webkit-scrollbar {
    display: none;
}

/* CLASS ITEM */

.class-item {
    padding: 10px;
    margin-bottom: 5px;
    border-radius: 7.654px;
    background: #FFF;
    box-shadow: 0px 3.951px 5.951px 0px rgba(0, 0, 0, 0.10);
    cursor: grab;
    font-size: 0.77rem; 
    font-weight: 500;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: 0.1s;
}

[data-class-id="MVEP"] {
    background: linear-gradient(270deg, #FFD700, #FFA500, #FFD700);
    background-size: 600% 600%;
    animation: gradientAnimation 10s ease infinite;
    transition: background-position 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
}

[data-class-id="MVEP"]:hover {
    animation: gradientAnimationHover 1s ease forwards;
    box-shadow: 0 0 5px rgba(255, 215, 0, 0.3), 0 0 20px rgba(255, 165, 0, 0.3);
}

.class-item:hover {
    background-color: #f1f1f1;
    transition: 0.2s;
}
.class-item:active {
    cursor: grabbing;
}
.semester-column .class-item {
    max-height: 200px;
    padding: 0.5rem;
    transition: 0.1s;
}

.semester-column .class-item:hover {
    max-height: 200px;
    transition: 0.2s;
    box-shadow: 0px 4.907px 15.458px 0px rgba(0, 0, 0, 0.15);
    transform: scale(1.03);
}

.class-id {
    font-weight: 700;
}

.class-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 0 10px;
}

.class-credits {
    display: inline-block;
    border-radius: 50%;
    min-width: 16.5px; 
    height: 16.5px; 
    background-color: blue;
    text-align: center;
    color: #FFF;
    font-size: 0.66rem; 
}

.available-classes .class-item {
    box-sizing: border-box;
    width: calc(20% - 10px);
    margin: 5px;
    padding: 10px;

}

.available-classes .class-item[data-class-id="4ME103"]:hover {
    animation: 0.4s shaking  ease;
}


/* Warnings */

.class-item.conflict {
    background-color: #ffcccc;
}
.class-item.conflict:hover {
    background-color: #efbcbc;
}

.recommended-warning {
    background-color: #fdffcc;
    border: 2px solid orange;
}
.prereq-highlight {
    background-color: #e0e0ff;
    cursor: grab;
    pointer-events: auto;
    animation: bounceIn 0.4s both;
    transition: 0.1s ease;
}

.prereq-highlight:hover {
    background-color: #d3d3f3;
    transition: 0.1s ease;
}

.sortable-ghost {
    box-sizing: border-box;
    opacity: 0.3;
    background-color: #e0e0e0;
    outline: 2px dashed #bbb;
}

.class-item.dragging {
    opacity: 0.5;
}

/* INFOBOX */

.info-box-container div, 
.info-header {
    animation: slideIn ease-in 0.2s;
}

.info-header {
    flex: 0.4;
    max-height: min-content; 
    font-size: 1.3rem;
    font-weight: 600;
    margin: 0;
    padding: 0;
}

.infobox-preload {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    width: 100%;
    font-size: 1.5em;
    font-weight: 400;
    text-align: center;
    opacity: 0.5;
    -webkit-user-select: none; 
    -ms-user-select: none; 
    user-select: none; 
}

.problem-message {
    font-style: italic;
    font-size: 12px; 
    color: red;       
    margin: 0;
    display: flex;
    flex-direction: column;
}

.info-box {
    flex: 0.5;
    min-height: max-content;
    margin: 5px 0;
    width: 100%;
    padding: 2px 0;
    border-top: 1px solid  #D6D6D6;
    border-bottom: 1px solid  #D6D6D6;
    scrollbar-width: none;
}

.notes-box {
    flex: 0.5;
    min-height: max-content;
    width: 100%;
    padding: 2px 0;
}

.info-box p {
    font-size: 0.9rem;
    margin: 0.5em 0;
    padding: 0;
}

.notes-box p {
    font-size: 0.9rem;
    padding: 0;
    margin: 0
}

.button-container {
    flex: 1;
    display: flex;
    align-items: end;
}

.insis-button {
    box-sizing: border-box;
    margin: 10px 0;
    width: 7rem;
    font-size: 1.65rem; 
    padding: 0.33em 0.44em; 
    border: 2px solid #0062AD;
    border-radius: 20px;
    background: #0062AD;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    gap: 10px;
    margin-bottom: 0;
    color: #FFF;
    transition: 0.2s ease;
}

a {
    text-decoration: none;
}

.insis-button label {
    font-family: "Titillium Web";
    font-size: 0.88rem; 
    font-style: normal;
    font-weight: 400;
    line-height: normal;
    margin: auto 0;
    cursor: pointer;
}

.insis-button:hover {
    background: none;
    transition: 0.2s ease;
    color: #0062AD;
    border-radius: 10px;
}

.insis-button:hover .svg-icon {
    filter: invert(32%) sepia(100%) saturate(2000%) hue-rotate(170deg) brightness(45%) contrast(100%);
}

.insis-button img {
    width: 25%;   
    margin: auto 0;
}


.flicker-red {
    animation: flicker-red 0.4s ease-in-out;
    z-index: 4;
}

.hidden-semester {
    display: none !important;
}


/* Notification  */
.message-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
}

.message {
    padding: 10px 20px;
    border-radius: 5px;
    color: #fff;
    font-size: 0.9em;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    opacity: 1;
    transition: opacity 0.5s ease-in-out;
    animation: fade-in 0.5s forwards;
    min-width: 200px;
    text-align: center;
}

.message.info {
    background-color: #007bff;
}

.message.success {
    background-color: #28a745;
}

.message.error {
    background-color: #dc3545; 
}

/* ANIMATIONS */

@keyframes fadeIn {
    from {
        transform: translateY(-10px);
        opacity: 0; 
    }
    to {
        transform: translateY(0);
        opacity: 1; 
    }
}

@keyframes gradientAnimation {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

@keyframes gradientAnimationHover {
    0% {
        background-position: inherit inherit;
    }
    100% {
        background-position: 100% 50%;
    }
}

@keyframes shaking {
    0% { transform: rotate(-3deg);
        transform: scale(1); }
    5% { transform: rotate(3deg); }
    10% { transform: rotate(-3deg); }
    15% { transform: rotate(3deg); }
    20% { transform: rotate(0deg); }
    50% { transform: scale(1.03); }
    100% { transform: rotate(0deg);
        transform: scale(1); }
   }

@keyframes bounceIn {
    0% {
      transform: scale(1);
    }

    20% {
        transform: scale(0.8);
    }
    60% {
      transform: scale(1.05);
    }
    100% {
      transform: scale(1);
    }
  }


@keyframes slideIn {
    0% {
        transform: translateX(-7px);
        opacity: 0;
    }
    100% {
        transform: translateX(0px);
        opacity: 1;
    }
}

@keyframes flicker-red {
    0% {background: 0; 
        background-color: transparent; }
    50% { background-color: #ffcccc; }
    100% {background: 0;  
        background-color: transparent; }
}

@keyframes fade-in {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fade-out {
    from { opacity: 1; transform: translateY(0); }
    to { opacity: 0; transform: translateY(10px); }
}

@media (max-height: 780px) {
    .link-container,
    .header-controls {
        margin: 0;
    }

    .link-container a {
        padding: 0 0.5rem;
        font-size: 0.7rem;
    }
    
    .top {
        gap: 0.55rem;
    }

    .mid {
        min-height: 1.5rem;
    }

    .bot {
        gap: 0.55rem;
    }
    
    th {
        padding: 5px 0 5px 0;
    }

    .semester-icon {
        height: 0.9em;
        width: 0.7em;
        padding: 3px;
        justify-content: center;
        align-items: flex-end;
        border-radius: 0px 0px 4.907px 4.907px;
        position: absolute;
        margin-top: -5px;
        margin-left: 17px;
    }

    .credit-counter {
        padding: 3px 10px;
    }

    .SC-credit-counter,
    .erasmus-toggle {
        font-size: 0.5rem;
    }

    .SC-credit-label {
        font-size: 0.7rem;
    }

    .container-delux {
        gap: 0.6rem;
        padding: 10px;
    }

    .available-classes {
        padding: 0.3rem;
    }

    .search-bar-container {
        width: 8rem;
    }

    .high-density-item {
        padding: 5px !important;  

    }

    .available-classes .class-item {
        padding: 8px !important; 
    }

    @media (max-width: 90em) {
        .mid.extended {
            min-height: auto;
            padding-top: 1rem;
            gap: 0; ;
        }
        .filters {
            height: 1.7rem;
        }
        
        .stats {
            display: none;
            height: 100%;
        }
        
        .stats-toggle {
            display: flex;
            align-items: center;
            justify-content: center;
        }
        
        .stats.stats-shown {
            display: flex;
        }

        .control-button {
            height: 1.3rem !important;
            width: 1.3rem !important;
        }
    }

    @media (max-width: 50em) {
        .dropdown {
            width: 6.5rem;
        }
    } 

    @media (max-width: 40em) {
        .info-box-container {
            min-width: 210px;
        }

        .credit-row {
            border-top: none !important;
        }

        .small-counter {
            padding: 0;
        }

        .small-counter .SC-credit-counter-container .erasmus-toggle,
        .small-counter .SC-credit-counter-container .SC-credit-counter {
            border-radius: 0 !important;
        }

    }
}

@media (max-width: 90em) {
    body {
        font-size: 1rem; 
    }
    
    .mid {
        background-color: #FFF;
        box-shadow: 0px 4.907px 15.458px 0px rgba(0, 0, 0, 0.15);
        border-radius: 1rem;
        gap: 0.5rem;
        padding: 0.4rem;
        flex-wrap: wrap;
        width: min-content;
    }

    .stats {
        box-shadow: none;
    }
   
    .available-classes .class-item {
        width: calc(25% - 10px);
    }
}

@media (max-width: 70em) {
    .available-classes {
        padding: 0.2rem;
    }
   
    .available-classes .class-item {
        width: calc(33.33% - 10px);
    }

}

@media (max-width: 60em) {
    .slim-header {
        display: flex;
        justify-content: space-between;
        height: 1.8rem;
    }
    
    .top {
        flex-direction: column;
        gap: 0.6rem;
        justify-content: flex-end;    
    }

    .planner-controls {
        display: none;
    }

    .standalone-controls {
        display: none;
    }

    .header-controls {
        display: flex;
        flex-direction: row;
        justify-content: center;
        align-items: center;
        box-sizing: border-box;
        gap: 0.5rem;
        height: 100%;
        padding:  0 0.5rem;
        background-color: #FFF;
        border: 1px solid #D6D6D6;
        border-radius: 20px 0 0 20px;
    }

    .control-button {
        height: 1.5rem;
        width: 1.5rem;
    }

    .available-classes .class-item {
        width: calc(50% - 10px);
    }
}

@media (max-width: 47em) {
    .mid {
        width: 100%;
    }

    .stats {
        justify-content: left;
        gap: 0.8rem;
        margin-left: 0.3rem;
    }

    .group{
        width: 7rem;
    }
    
    .search-bar-container {
        width: 9rem;

    }

    .c-label {
        visibility: hidden;
        position: relative;
        width: 2.5rem;
        height: 1.1rem;
    }

    .oP-credits .c-label::before {
        content: "oP";
        visibility: visible;
        position: absolute;
        left: 0;
        top: 0;
    }

    .oV-credits .c-label::before {
        content: "oV";
        visibility: visible;
        position: absolute;
        left: 0;
        top: 0;
        
    }

    .oJ-credits .c-label::before {
        content: "oJ1";
        visibility: visible;
        position: absolute;
        left: 0;
        top: 0;
    }

    .tv-credits .c-label::before {
        content: "cTVS1";
        visibility: visible;
        position: absolute;
        left: 0;
        top: 0;
    }

    .all-credits .c-label::before {
        content: "Celkem";
        visibility: visible;
        position: absolute;
        left: 0;
        top: 0;
    }

    .show-available {
        height: 100%;
    }

    .show-available label {
        visibility: hidden;
        position: relative;
        width: 7rem;
    }

    .show-available label::before {
        display: flex;
        align-items: center;
        justify-content: center;
        box-sizing: border-box;
        height: 100%;
        width: 7rem;
        padding: 0.6rem;
        border-radius: 20px;
        background: #ffffff;
        color: #555555;
        border: 1px solid #ddd;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
        content: "Jen dostupné";
        visibility: visible;
        position: absolute;
        left: 0;
        top: 0;
    }

    .show-available label:hover::before {
        transition: 0.2s ease;
    }

    .show-available input[type="checkbox"]:checked + label::before {
        content: "✓  Jen dostupné";
        background-color: #000000;
        color: #fff;
    }

}

@media (max-width: 40em) {
    .available-classes .class-item {
        width: calc(100% - 10px);
        height: 2rem;
    }
    
    .filters {
        gap: 0.5rem;
    }

    .search-bar-container {
        width: 7rem;
    }
}

.mid-column .class-item .class-id,
.small-column .class-item .class-id {
    display: none;
}

.small-column .class-item {
    border-right: 4px solid; 
}

.small-column .class-item[data-class-group="oP"] {
    border-right-color: #0062AD;
}

.small-column .class-item[data-class-group="oV"] {
    border-right-color: #8A00AD;
}

.small-column .class-item[data-class-group="oJ1"],
.small-column .class-item[data-class-group="oJ"] {
    border-right-color: #DE5900;
}

.small-column .class-item[data-class-group="cTVS1"] {
    border-right-color: #00A189;
}

.small-column .class-item[data-class-group="oSZ"] {
    border-right-color: #000000;
}

.small-column .class-item:hover .class-credits {
    display: block;
}

.small-column .class-item .class-name {
    max-width: 100%;
    padding: 0 2px;
    font-size: 0.6rem;
}

.mid-column .class-item .class-name {
    font-size: 0.7rem;
    padding: 0 3px;
}

.small-column .class-item .class-credits {
    display: none;
}


.small-counter .SC-credit-counter, .erasmus-toggle  {
    margin: 0;
}

.small-counter .SC-credit-label {
    display: none;
}

.small-counter .SC-credit-counter {
    width: 50%;
    border-radius: 0 1rem 1rem 0;
}

.small-counter .erasmus-toggle {
    width: 50%;
    border-radius: 1rem 0 0 1rem ;
}

.mid-header {
    padding: 0.5em 0;
}

.mid-header.winter {
    box-sizing: border-box;
    border-bottom: 10px solid #0062AD;
}

.mid-header.summer {
    box-sizing: border-box;
    border-bottom: 10px solid #FFAE00;
}

.small-header.summer {
    border-bottom: 5px solid #FFAE00;
}

.small-header.winter {
    border-bottom: 5px solid #0062AD;
}

.mid-header .semester-icon,
.small-header .semester-icon {
    display: none;
}

.small-header {
    padding: 0.3em;
    font-size: 0.8rem;
}