/* Общие стили для таблицы */
table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    text-align: center;
    padding: 5px 4px;
    border: 1px solid #ddd;
    font-size: inherit; /* Размер шрифта наследуется от родительского элемента */
    vertical-align: middle;
    overflow-wrap: anywhere;
}

th {
    font-size: 12px;
    line-height: 1.2;
}

td {
    font-size: 13px;
    line-height: 1.35;
}
th:nth-child(8), th:nth-child(9), th:nth-child(10), th:nth-child(11), th:nth-child(13), th:nth-child(14), th:nth-child(15), th:nth-child(16) {
    width: auto;
}

th:nth-child(19), th:nth-child(20), th:nth-child(21) {
    width: auto;
}

/* Стили для заголовков */
th {
    cursor: pointer;
}

th:nth-child(1) {
    background-color: #86a2fd;
}

th:nth-child(3) {
    background-color: #a3019b;
}

th:nth-child(4), th:nth-child(5), th:nth-child(6), th:nth-child(20) {
    background-color: #86a2fd;
}

th:nth-child(12), th:nth-child(13), th:nth-child(14), th:nth-child(15), th:nth-child(16), th:nth-child(18), th:nth-child(21) {
    background-color: #a3019b;
}

/* Дополнительные классы для фона */
.class1 {
    background-color: rgba(135, 209, 135, 0.699);
    font-weight: bold;
}

.class2 {
    background-color: rgb(240, 248, 130);
}

.class3 {
    background-color: rgb(240, 166, 81);
}

.class4 {
    background-color: rgba(83, 94, 97, 0.418);
}

.class5 {
    background-color: rgb(255, 104, 104);
}

.form-control {
    width: 200px;
}

.bn32 {
    border-color: #ffffff;
    padding: 0.6em 2.3em;
    cursor: pointer;
    font-size: 1em;
    color: #1d1d1d;
    background-image: linear-gradient(45deg, transparent 50%, #000000 50%);
    background-position: 25%;
    background-size: 400%;
    -webkit-transition: background 500ms ease-in-out, color 500ms ease-in-out;
    transition: background 500ms ease-in-out, color 500ms ease-in-out;
}

.bn32:hover {
    color: #ffffff;
    background-position: 100%;
}

.table-border-arr {
    border: 1.5px solid rgb(0, 128, 0);
}

.table-border-dep {
    border: 1.5px solid rgb(156, 9, 161);
}

.table-border-actual {
    border: 2px solid rgb(252, 252, 252, 0.5);
}

.form-group {
    margin-bottom: 10px;
}

.data-table {
    margin-top: auto;
}

.form-control {
    width: 200px;
}

.header {
    position: auto;
    top: 0;
    left: 0;
    width: 100%;
    background-size: cover;
    background-color: #f1f1f1;
    padding: 10px;
    z-index: 999;
}
th {
    background-color: #4CAF50;
    color: white;
    cursor: default;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.table-scroll {
    max-width: 100%;
    overflow-x: visible;
}

.data-table {
    min-width: 0;
    table-layout: fixed;
}

#date-filter:focus-visible,
#search-input:focus-visible {
    outline: 3px solid #1d70b8;
    outline-offset: 2px;
}

.flight-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(380px, 1.5fr) minmax(0, 1fr);
    gap: 24px;
    align-items: end;
    padding: 18px 24px;
    border-bottom: 1px solid #cfd8e3;
    background-color: #f7f9fc;
    background-image: linear-gradient(rgba(247, 249, 252, 0.9), rgba(247, 249, 252, 0.9)), url("/static/css/Pulkovo2.jpg");
    background-position: center;
    background-size: cover;
}

.flight-header__brand h1 {
    margin: 0;
    color: #172033;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.2;
}

.flight-header__brand,
.flight-header__filters,
.flight-header__meta {
    min-width: 0;
}

.flight-header__eyebrow {
    margin: 0 0 4px;
    color: #52647a;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.flight-header__filters {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.flight-header__field {
    display: grid;
    gap: 4px;
}

.flight-header__field label,
.flight-header__meta span {
    color: #52647a;
    font-size: 12px;
    font-weight: 600;
}

.flight-header__field input {
    width: 100%;
    min-height: 38px;
    padding: 8px 10px;
    border: 1px solid #aab7c7;
    border-radius: 4px;
    background-color: #ffffff;
    color: #172033;
    font-size: 14px;
}

.flight-header__meta {
    display: grid;
    justify-items: end;
    gap: 3px;
    color: #172033;
    font-size: 13px;
    line-height: 1.3;
}

.flight-header__meta time {
    font-variant-numeric: tabular-nums;
}

.flight-header__meta a {
    color: #1d5e97;
    text-decoration: none;
    overflow-wrap: anywhere;
}

.flight-header__meta a:hover,
.flight-header__meta a:focus-visible {
    text-decoration: underline;
}

@media (max-width: 900px) {
    .flight-header {
        grid-template-columns: 1fr;
        align-items: start;
    }

    .flight-header__meta {
        justify-items: start;
    }
}