@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css');
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&display=swap');

* {
    box-sizing: border-box;
}

body {
    background: #161616;
    color: #e5e5e5;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    margin: 0;
    padding: 15px;
    font-size: 13px;
    line-height: 1.4;
}

.tabtytul {
    margin-bottom: 30px;
}

.tytul {
    color: #f5f5f5;
    text-align: center;
}

.tytulnapis {
    font-size: 30px;
    font-weight: 600;
    color: #ffffff;
    margin: 0;
}

.navigation {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    z-index: 100;
    justify-content: flex-start;
}

.nav-group {
    display: flex;
    align-items: center;
}

select, button {
    background: #1a1a1a;
    border: 1px solid #222;
    border-radius: 6px;
    color: #e5e5e5;
    padding: 6px 10px;
    font-family: inherit;
    font-size: 12px;
    transition: all 0.15s ease;
    height: 30px;
}

select:focus, button:focus {
    outline: none;
    border-color: #222;
    box-shadow: 0 0 0 2px rgba(255,255,255,0.1);
}

button {
    cursor: pointer;
    min-width: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #161616;
}

button:hover {
    background: #222;
}

.tabela {
    background: #111111;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
    overflow: hidden;
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

th {
    background: #1a1a1a;
    color: #f0f0f0;
    font-size: 13px;
    font-weight: 600;
    padding: 12px 12px;
    text-align: center;
    border-bottom: 1px solid #333;
}

th:not(:last-child) {
    border-right: 1px solid #333;
}

th i {
    margin-right: 4px;
    font-size: 11px;
    color: #aaa;
}

td {
    padding: 10px 8px;
    border-bottom: 1px solid #1e1e1e;
    vertical-align: top;
}

td:not(:last-child) {
    border-right: 1px solid #1e1e1e;
}

td.g {
    background: #1a1a1a;
    color: #c0c0c0;
    font-weight: 500;
    text-align: center;
    white-space: nowrap;
    font-size: 12px;
    width: 80px;
}

td.g i {
    font-size: 10px;
    color: #999;
}

td.nr {
    background: #161616;
    color: #aaa;
    font-weight: 600;
    text-align: center;
    font-size: 13px;
    width: 40px;
}

td.l {
    color: #e5e5e5;
    vertical-align: top;
    min-width: 140px;
    background: #161616;
}

.lesson-item {
    margin-bottom: 8px;
    padding: 8px;
    background: #1a1a1a;
    border-radius: 6px;
    border-left: 2px solid #444;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
}

.lesson-item:last-child {
    margin-bottom: 0;
}

.lesson-item:hover {
    background: #222;
    border-left-color: #666;
}

.p {
    color: #ffffff;
    font-weight: 500;
    font-size: 13px;
    display: flex;
    margin-bottom: 6px;
    /* line-height: 1.3; */
    gap: 5px;
    align-items: center;
    margin-top: 4px;
}

.p i {
    font-size: 11px;
    color: #aaa;
}

.lesson-tags {
    display: flex;
    flex-wrap: nowrap;
    gap: 4px;
    margin-left: 6px;
}

.tag {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 6px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.15s ease;
    border: 1px solid;
}

.tag i {
    font-size: 9px;
}

.tag.group {
    background: #2a2a2a;
    color: #d0d0d0;
    border-color: #444;
}

.tag.group:hover {
    background: #333;
    border-color: #555;
}

.tag.teacher {
    background: #252525;
    color: #e0e0e0;
    border-color: #404040;
}

.tag.teacher:hover {
    background: #333;
    border-color: #555;
}

.tag.classroom {
    background: #282828;
    color: #d5d5d5;
    border-color: #454545;
}

.tag.classroom:hover {
    background: #333;
    border-color: #555;
}

@media (max-width: 768px) {
    body {
        padding: 8px;
        font-size: 12px;
    }

    .tytulnapis {
        font-size: 20px;
    }

    .navigation {
        position: relative;
        top: auto;
        left: auto;
        justify-content: center;
        margin-bottom: 15px;
    }

    th, td {
        padding: 8px 6px;
    }

    .lesson-item {
        padding: 6px;
    }

    .tag {
        padding: 1px 4px;
        font-size: 10px;
    }

    td.l {
        min-width: 120px;
    }
}

#republika {
    animation: fade 0.35s ease-in-out infinite alternate;
    opacity: 1;
}

@keyframes fade {
    from {
        opacity: 1;
    }
    to {
        opacity: 0.7;
    }
}

@media print {
    body {
        background: white;
        color: black;
        font-size: 11px;
    }

    .tabtytul, .navigation {
        display: none;
    }

    .tabela {
        background: white;
        box-shadow: none;
        border: 1px solid #000;
    }

    .tag {
        background: white !important;
        color: black !important;
        border: 1px solid #000 !important;
    }
}

.free-rooms-btn i {
    margin-right: 4px;
    font-size: 11px;
}

.search-form {
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.form-row {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    align-items: end;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.form-group label {
    font-weight: 500;
    font-size: 13px;
    color: #c0c0c0;
}

.search-btn {
    gap: 6px;
}

.results {
    margin-top: 20px;
}

.results h3 {
    color: #f0f0f0;
    font-size: 18px;
    margin-bottom: 15px;
}

.time-slots {
    color: #c0c0c0;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.time-slots i {
    font-size: 10px;
    color: #aaa;
}

.no-results {
    background: #2a1a1a;
    border: 1px solid #8B4513;
    color: #ffcc99;
    padding: 15px;
    border-radius: 6px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.loading {
    text-align: center;
    padding: 20px;
    color: #aaa;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.container h1 {
    color: #f0f0f0;
    text-align: center;
    margin-bottom: 30px;
}

.container button {
    background: #1a1a1a;
    border: 1px solid #222;
    color: #e5e5e5;
    padding: 12px 20px;
    margin: 5px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.15s ease;
}

.container button:hover {
    background: #222;
    border-color: #333;
}

.multiselect-wrapper {
    position: relative;
    display: inline-block;
}

.multiselect-trigger {
    background: #1a1a1a;
    border: 1px solid #222;
    border-radius: 6px;
    color: #e5e5e5;
    padding: 15px 15px;
    font-family: inherit;
    font-size: 14px;
    transition: all 0.15s ease;
    height: 30px;
}

.multiselect-trigger:hover {
    background: #262626;
    border-color: #444;
}

.multiselect-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    min-width: 180px;
    z-index: 1000;
    overflow: hidden;
}

.multiselect-dropdown.active {
    display: block;
}

.group-option {
    padding: 10px 14px;
    cursor: pointer;
    user-select: none;
    color: #ccc;
    transition: all 0.15s ease;
    border-left: 3px solid transparent;
    font-size: 14px;
}

.group-option:hover {
    background-color: #2a2a2a;
    color: #fff;
}

.group-option.active {
    background-color: #333;
    color: #6f8a70;
    border-left-color: #6f8a70;
    font-weight: 500;
}

.multiselect-dropdown input[type="checkbox"] {
    margin-right: 8px;
    cursor: pointer;
    width: 16px;
    height: 16px;
    accent-color: #6f8a70;
}

.multiselect-dropdown label {
    display: block;
    padding: 8px 12px;
    cursor: pointer;
    user-select: none;
    color: #ccc;
    transition: background-color 0.15s ease;
}

.multiselect-dropdown label:hover {
    background-color: #2a2a2a;
}

@media (max-width: 768px) {
    .form-row {
        flex-direction: column;
        gap: 10px;
    }

    .form-group {
        width: 100%;
    }

    .search-btn {
        width: 100%;
        justify-content: center;
    }

    .free-rooms-btn {
        width: 100%;
        padding: 8px 12px;
        font-size: 11px;
    }
}
