:root {
    --primary-color: #2f21b3;
}

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

.bg-light-2 {
    background: #fff !important;
}

.timetable-title {
    text-align: center;
    margin-bottom: 15px;
}

.search-box-container {
    display: flex;
    justify-content: start;
}


.search-box {
    padding: 20px 30px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    max-width: 900px;
    width: 100%;
    height: max-content;
}

.form-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.form-control {
    flex: 1;
    border: 1px solid var(--primary-color);
    border-radius: 6px;
    /*padding: 12px 15px;*/
    font-size: 16px;
    color: var(--primary-color);
    outline: none;
}

.search-btn {
    background: var(--primary-color);
    border: none;
    padding: 0 30px;
    height: 45px;
    border-radius: 8px;
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    transition: 0.3s;
}

.filter-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.filter-btn {
    background: #fff;
    border: 1px solid var(--primary-color);
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    transition: 0.3s;
    font-size: 14px;
    color: var(--primary-color);
}

.filter-btn:hover {
    background: var(--primary-color);
    color: #fff;
}

.filter-btn.active {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

.calendar-header button {
    background: #fff;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    border-radius: 5px;
    padding: 5px 10px;
}

.calendar-header button:hover {
    background: var(--primary-color);
    color: #fff;
}

.results {
    margin-top: 20px;
}

.flight-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 15px 20px;
    margin-bottom: 15px;
    background: #fff;
}

.flight-side {
    width: 20%;
    text-align: left;
}

.flight-side.right {
    text-align: right;
}

.city {
    font-size: 21px;
    font-weight: bold;
}

.code {
    font-size: 14px;
    color: #777;
}

.time {
    font-size: 22px;
    font-weight: 500;
    margin: 6px 0;
}

.date {
    font-size: 16px;
    color: #555;
}

.flight-center {
    flex: 1;
    text-align: center;
}

.duration {
    font-size: 16px;
    color: #333;
}

.stops {
    font-size: 13px;
    color: #1a73e8;
    cursor: pointer;
}

.btn-container {
    display: flex;
    justify-content: end;
    align-items: center;
}

.date-picker {
    position: relative;
    flex: 1;
}

.date-input {
    border: 1px solid var(--primary-color);
    border-radius: 6px;
    padding: 0 15px;
    font-size: 16px;
    height: 45px;
    color: var(--primary-color);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.calendar-icon {
    font-size: 18px;
}

.calendar-popup {
    display: none;
    position: absolute;
    top: 50px;
    right: 0;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    width: 600px;
    display: flex;
}

.calendar-sidebar {
    background: #f7f9fc;
    border-right: 1px solid #ddd;
    padding: 10px;
    width: 120px;
}

.calendar-sidebar button {
    display: block;
    width: 100%;
    padding: 8px;
    margin-bottom: 5px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    text-align: left;
    background: transparent;
    color: var(--primary-color);
}

.btn-calendar__container .confirm-btn {
    background: var(--primary-color);
    padding: 0 10px;
    border-radius: 6px;
    color: #fff;
    height: 45px;
}

.calendar-sidebar button:hover,
.calendar-sidebar button.active {
    background: var(--primary-color);
    color: #fff;
}

.calendar-main {
    flex: 1;
    padding: 10px;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
    margin: 10px 0;
}

.day {
    padding: 8px;
    text-align: center;
    border-radius: 4px;
    cursor: pointer;
}

.day:hover {
    background: #eee;
}

.day.selected {
    background: var(--primary-color);
    color: #fff;
}

.day.in-range {
    background: #d6d4f7;
}

.timetable-note {
    font-size: 16px;
    background-color: #3554d121;
    border-left: 4px solid var(--color-blue-1);
    padding: 10px 15px;
    margin-bottom: 20px;
    border-radius: 4px;
    font-style: italic;
}


#calendarPopup {
    display: none;
    position: absolute;
}

.no-flights-found {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    /*color: #afafaf;*/
    color: var(--primary-color);
    opacity: .6;
}

.btn-calendar__container {
    display: flex;
    justify-content: end;
}
.line-with-icons {
    display: flex;
    align-items: center;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
}

.line-with-icons img {
    width: 30px;
}

.line-with-icons .line {
    flex-grow: 1;
    height: 2px;
    background-color: #ccc;
    position: relative;
    width: 100%;
}

.icon-wrapper {
    display: flex;
    /*flex-direction: column;*/
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: #555;
    width: 100%;
}

.airport-code {
    letter-spacing: .5px;
    font-size: 16px;
    font-weight: 700;
    font-family: Montserrat sans-serif !important;
    /*color: #777;*/
}

.duration-text {
    font-weight: 700;
}

.select-wrapper {
    position: relative;
    flex: 1;
}

.select-wrapper select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding-right: 30px;
}

.select-wrapper::after {
    content: "▼";
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: var(--primary-color);
    font-size: 12px;
}


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

    .flight-card {
        padding: 10px 15px;
        margin-bottom: 10px;
    }

    .flight-side,
    .flight-side.right {
        width: 100px;
    }

    .city {
        font-size: 14px;
    }

    .time {
        font-size: 20px;
        margin: 3px 0;
    }

    .date {
        font-size: 13px;
    }

    .form-control, .select-wrapper {
        width: 100%;
    }


    .search-btn {
        width: 100%;
    }

    .date-picker {
        width: 100%;
    }

    .calendar-popup {
        flex-direction: column;
        width: 100%;
    }

    .flight-center {
        width: 100px;
    }

    .duration {
        font-size: 12px;
        margin-bottom: 5px;
    }

    .search-box {
        padding: 10px 20px;
    }

    .calendar-sidebar {
        width: auto;
        display: flex;
        gap: 10px;
    }

    .calendar-sidebar button {
        text-align: center;
        border: 1px solid var(--primary-color);
    }

    .day {
        padding: 4px;
    }

    /*.calendar-header button {*/
    /*    padding: 0 10px;*/
    /*}*/

    .no-flights-found {
        gap: 5px !important;
    }

    .timetable-note {
        font-size: 14px;
        padding: 5px 10px;
        margin-bottom: 10px;
        border-radius: 4px;
    }

    .line-with-icons .line {
        margin: 0 5px;
    }

    .line-with-icons img {
        width: 20px;
    }

    .airport-code {
        font-size: 12px;
        letter-spacing: 0;
    }

    .icon-wrapper img {
        display: none;
    }
}
