:root {
    --background-color: #ffffff;
    --text-color: #181818;
    --block-color: #f4f2ea;
    --link-color: #d0d7e1;
    --alert-color: #d8071f;
    --input-color: #d0d7e1;
}

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

a {
    text-decoration: none;
}

.red {
    color: var(--alert-color);
}

.code-font {
    font-family: "Fira Code", monospace;
    font-optical-sizing: auto;
    font-weight: 400;
    font-style: normal;
}

.text-font {
    font-family: "Vollkorn", serif;
    font-optical-sizing: auto;
    font-weight: 300;
    font-style: normal;
}

.text-font-bold {
    font-family: "Vollkorn", serif;
    font-optical-sizing: auto;
    font-weight: 500;
    font-style: normal;
}

body,
html {
    overflow-x: hidden;
    height: 100vh;
}

.button-link {
    padding: 5px 1em;
    text-align: center;
    border: 1px dotted var(--text-color);
    border-radius: 4px;
    background-color: var(--link-color);
    color: var(--text-color);
    margin: 0px 1em;
    font-family: "Fira Code", monospace;
    font-size: 0.8em;
    cursor: pointer;
}

h1,
h2,
h3 {
    font-family: "Vollkorn", serif;
}

menu {
    position: fixed;
    top: 0px;
    left: 0px;
    width: 300px;
    height: 100%;
    background-color: var(--block-color);
    border-right: 1px solid var(--text-color);
    text-align: left;
}

menu h2 {
    text-align: center;
    padding: 1em;
    font-size: 1.5em !important;
    font-family: "Vollkorn", serif;
}

#studentsList {
    list-style-type: none;
    width: 100%;
}

#studentsList li {
    height: 3em;
    padding: 0.7em 2em;
    font-size: 1em;
    cursor: pointer;
}

#studentsList li.showInactive {
    text-align: center;
}

#studentsList li:not(.showInactive):hover {
    background-color: var(--background-color);
    border-top: 1px solid var(--text-color);
    border-bottom: 1px solid var(--text-color);
}

#studentsList li.showInactive:hover {
    border: 0;
    background-color: var(--block-color);
}

/* Main */

header {
    position: relative;
    top: 0px;
    left: 300px;
    width: calc(100% - 300px);
    height: 2em;
    padding: 5px 1em;
    border-bottom: 1px dotted var(--alert-color);
    color: var(--alert-color);
    font-size: 0.8em;
    box-sizing: border-box;
}

main {
    position: relative;
    top: 2em;
    left: 300px;
    width: calc(100% - 300px);
    height: 100%;
    color: var(--text-color);
    padding: 0em 2em;
}

main h1,
h2,
h3 {
    padding: 0em 0em;
    text-align: center;
}

.active {
    color: var(--text-color);
}

.inactive {
    color: var(--link-color);
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0px;
    align-items: center;
    padding: 1em 0;
    margin: 0 auto;
    justify-content: center;
}

#studentCard {
    width: 90%;
    padding: 2em;
    margin: 2em auto;
    border: 1px solid var(--text-color);
    background-color: var(--block-color);
    box-shadow: 5px 5px;
}

.standardCard {
    width: 90%;
    padding: 2em;
    margin: 2em auto;
    border: 1px solid var(--text-color);
    background-color: var(--block-color);
    box-shadow: 5px 5px;
}

#studentCard h2 {
    padding: 0.5em 0.5em;
    text-transform: uppercase;
}

#studentCard h3 {
    padding: 0.5em 0.5em;
}

table {
    margin: 0.5em;
    padding: 0.5em;
}

th {
    text-align: right;
}

td {
    padding: 0.5em 1em;
    text-align: left;
}

#consultationsTable table {
    width: 97%;
}

#consultationsTable td {
    padding: 0.1em 0.5em;
    text-align: left;
    background-color: var(--background-color);
}

#consultationsTable th {
    padding: 0.1em 0.5em;
    text-align: left;
}

.alertBox {
    border: 1px dotted var(--alert-color);
    color: var(--alert-color);
    padding: 0.5em 1em;
    width: 80%;
    margin: 1em auto;
}

.formEdit {
    width: 95%;
    border: 1px dotted var(--text-color);
    border-radius: 4px;
    margin: 0.5em auto;
    padding: 1em 1em;
    display: block;
    grid-template-columns: max-content 1fr;
    gap: 0.5em 1em; /* row-gap, column-gap */
    align-items: center;
}

.formEdit label {
    text-align: right;
    white-space: nowrap;
    padding-bottom: 0.25rem;
}

.formEdit input,
.formEdit select,
.formEdit textarea {
    width: 100%;
    padding: 0.5em 0.5em;
    background-color: var(--input-color);
    border: 1px dotted var(--text-color);
    border-radius: 4px;
}

.formRow {
    width: 100%;
    padding: 0.5em 0.5em;
}

#addStudentCard {
    width: 80%;
    padding: 2em;
    margin: 2em auto;
    border: 1px solid var(--text-color);
    background-color: var(--block-color);
    box-shadow: 5px 5px;
}

#addStudentCard h2 {
    padding: 0.5em 0.5em;
    text-transform: uppercase;
}

#addStudentCard h3 {
    padding: 0.5em 0.5em;
}

fieldset {
    border: 0;
    border-bottom: 1px dotted var(--text-color);
    padding: 0.5em 0.5em;
    margin: 0.5em 0;
}

.schedulerTable {
    width: 90%;
    background-color: var(--block-color);
    border: 1px solid var(--text-color);
    box-shadow: 5px 5px;
    padding: 1em;
    margin: 2em auto;
    text-align: center;

    table-layout: fixed; /* ← DŮLEŽITÉ pro rovnoměrné šířky */
    border-collapse: collapse;
}

.schedulerTable th,
.schedulerTable td {
    padding: 5px;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    border: 1px dotted #ccc;
}

/* První sloupec – Datum */
.schedulerTable th.date-col,
.schedulerTable td.date-col {
    width: 20%; /* nebo 15%, jak chceš */
    font-weight: bold;
}

/* Volné termíny */
.schedulerTable td.empty {
    background-color: var(--background-color);
}

.schedulerTable td.disabled {
    background-color: #eee;
    color: #999;
}

/* Obsazené sloty */
.schedulerTable td.occupied {
    background-color: #f4f4f4;
    color: #444;
}

/* Odkaz v buňce */
.schedulerTable a {
    color: sienna;
    display: block;
    width: 100%;
}

hr {
    border: 1px dotted var(--text-color);
    width: 60%;
    max-width: 700px;
    margin: 1em auto;
}

#footer-text {
    text-align: center;
    font-family: "Fira Code", monospace;
    font-size: 0.5em;
    color: var(--text-color);
}

.centered {
    display: block;
    margin: 1em auto;
    text-align: center;
}

#quarterWorkload {
    max-width: 250px !important;
    max-height: 250px !important;
    display: block;
    margin: 1em auto;
    text-align: center;
}

.messageTable {
    width: 90%;
    background-color: var(--block-color);
    border: 1px solid var(--text-color);
    box-shadow: 5px 5px;
    padding: 1em;
    margin: 2em auto;
    text-align: center;
    border-collapse: collapse;
}

.messageTable th,
.messageTable td {
    padding: 5px;
    text-align: left;
    border: 1px dotted #ccc;
}

.messageTable th {
    font-weight: 700;
}

/* Odkaz v buňce */
.messageTable a {
    color: sienna;
    display: block;
    width: 100%;
}

.ok {
    color: green;
}
.error {
    color: red;
}
.copy-email {
    cursor: pointer;
    text-decoration: underline;
}
.copy-all {
    cursor: pointer;
}

.slots {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
    width: 100%;
}

.slot {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.85rem;
}

.slot.free {
    background: #d1e7dd;
    color: #0f5132;
    text-decoration: none;
}

.slot.occupied {
    background: #f8d7da;
    color: #842029;
}

.teacher-applet {
    margin-top: 2rem;
    margin-bottom: 2rem;
    padding: 1rem;
    border: 1px dotted #ddd;
}

.subject-tabs {
    margin: 2rem;
    display: flex;
    gap: 1rem;
    justify-content: center;
    justify-items: center;
    flex-wrap: wrap;
}

.subject-panel {
    margin-top: 1rem;
}
.date-block {
    margin-bottom: 1rem;
}

.subject-tab {
    background: #0d6efd;
    color: #fff;
    cursor: pointer;
}

.subject-list {
    list-style: none;
    padding: 0;
}
.subject-list li {
    margin-bottom: 0.3rem;
}
.subject-list a {
    text-decoration: none;
    color: #0b5ed7;
}
/* layout pro buňku se sloty */
.schedulerTable td .slots {
    display: flex;
    flex-direction: column; /* ať jsou pod sebou, když jich je víc */
    gap: 0.4rem;
    width: 100%;
}

/* TADY je ta důležitá část – přebijeme globální styly */
.schedulerTable td .slots .slot,
.schedulerTable td .slots a.slot,
.schedulerTable td .slots span.slot {
    display: block !important;
    width: 100% !important;
    box-sizing: border-box;
    text-align: center;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}
