.rihlatk-bw {
    --bw-ink: #142B54;
    --bw-muted: #667085;
    --bw-gold: #147DFB;
    --bw-line: #E3E5E8;
    --bw-fill: #F3F7FC;
    --bw-card: #FFFFFF;
    --bw-navy: #147DFB;
    font-family: inherit;
    color: var(--bw-ink);
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    container-type: inline-size;
    container-name: rihlatk-bw;
}
.rihlatk-bw,
.rihlatk-bw * {
    box-sizing: border-box;
}
.rihlatk-bw .hidden,
.rihlatk-bw .is-hidden {
    display: none !important;
}

.rihlatk-bw__card {
    background: var(--bw-card);
    border: 1px solid var(--bw-line);
    border-radius: 22px;
    box-shadow: 0 18px 40px rgba(17, 24, 39, 0.06);
    padding: 10px;
}

.rihlatk-bw__modes {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    margin: 2px 6px 8px;
    padding: 3px;
    background: var(--bw-fill);
    border: 1px solid var(--bw-line);
    border-radius: 999px;
}
.rihlatk-bw__mode {
    position: relative;
    cursor: pointer;
    margin: 0;
}
.rihlatk-bw__mode input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.rihlatk-bw__mode span {
    display: block;
    padding: 7px 14px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
    color: var(--bw-muted);
    white-space: nowrap;
    transition: background 0.15s ease, color 0.15s ease;
}
.rihlatk-bw__mode input:checked + span {
    background: #147DFB;
    color: #fff;
    box-shadow: none;
}
.rihlatk-bw__mode input:focus-visible + span {
    outline: 2px solid var(--bw-gold);
    outline-offset: 1px;
}

.rihlatk-bw__main {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    background: #fff;
    border: 1px solid var(--bw-line);
    border-radius: 16px;
}

.rihlatk-bw__cluster,
.rihlatk-bw__when,
.rihlatk-bw__return {
    display: flex;
    align-items: stretch;
    min-width: 0;
    position: relative;
}
.rihlatk-bw__cluster {
    flex: 1 1 340px;
}
.rihlatk-bw__when,
.rihlatk-bw__return {
    flex: 1 1 220px;
}

.rihlatk-bw__cell {
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex: 1 1 0;
    min-width: 0;
    padding: 8px 14px 10px;
    position: relative;
    cursor: pointer;
}
.rihlatk-bw__cell:focus-within {
    background: #FAFBFC;
}

.rihlatk-bw__when::before,
.rihlatk-bw__return::before,
.rihlatk-bw__when .rihlatk-bw__cell + .rihlatk-bw__cell::before,
.rihlatk-bw__return .rihlatk-bw__cell + .rihlatk-bw__cell::before,
.rihlatk-bw__cluster .rihlatk-bw__cell + .rihlatk-bw__cell::before {
    content: "";
    position: absolute;
    top: 12px;
    bottom: 12px;
    inset-inline-start: 0;
    width: 1px;
    background: var(--bw-line);
    pointer-events: none;
}
.rihlatk-bw__when .rihlatk-bw__cell:first-child::before,
.rihlatk-bw__return .rihlatk-bw__cell:first-child::before {
    display: none;
}

.rihlatk-bw__label {
    display: block;
    margin: 0 0 2px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: var(--bw-muted);
    line-height: 1.2;
}

.rihlatk-bw input[type="text"],
.rihlatk-bw input[type="number"],
.rihlatk-bw input[type="date"],
.rihlatk-bw input[type="time"] {
    width: 100%;
    margin: 0;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0;
    background-color: transparent !important;
    color: var(--bw-ink);
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.35;
    min-height: 24px !important;
    height: auto !important;
    box-shadow: none !important;
    outline: none;
}
.rihlatk-bw select {
    width: 100%;
    margin: 0;
    border: 0 !important;
    border-radius: 0;
    background-color: transparent !important;
    color: var(--bw-ink);
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.35;
    min-height: 24px !important;
    height: auto !important;
    box-shadow: none !important;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%23667085' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 4px center;
    padding-block: 4px !important;
    padding-inline-start: 10px !important;
    padding-inline-end: 18px !important;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
}
.rihlatk-bw select option {
    padding: 8px 12px;
}
.rihlatk-bw input[type="date"],
.rihlatk-bw input[type="time"] {
    position: relative;
    cursor: pointer;
    color-scheme: light;
}
.rihlatk-bw input[type="date"]::-webkit-calendar-picker-indicator,
.rihlatk-bw input[type="time"]::-webkit-calendar-picker-indicator {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    opacity: 0;
    cursor: pointer;
}
.rihlatk-bw input[type="number"] {
    -moz-appearance: textfield;
}
.rihlatk-bw input[type="number"]::-webkit-outer-spin-button,
.rihlatk-bw input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.rihlatk-bw__swap {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 42px;
    position: relative;
    z-index: 2;
}
.rihlatk-bw__swap button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 1px solid var(--bw-line);
    border-radius: 999px;
    background: #fff;
    color: var(--bw-ink);
    cursor: pointer;
    appearance: none;
    background-image: none;
    transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.rihlatk-bw__swap button:hover {
    border-color: #147DFB;
    background: #F3F7FC;
    color: #147DFB;
}
.rihlatk-bw__swap svg {
    width: 14px;
    height: 14px;
}

.rihlatk-bw__go {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex: 0 0 auto;
    align-self: stretch;
    min-width: 116px;
    margin: 6px;
    padding: 0 18px;
    border: 0;
    border-radius: 12px;
    background: var(--bw-navy);
    background-image: none;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    min-height: 52px;
    appearance: none;
    box-shadow: none;
    transition: background 0.15s ease;
}
.rihlatk-bw__go:hover {
    background: #3F6EAE;
    color: #fff;
}
.rihlatk-bw__go svg {
    width: 16px;
    height: 16px;
}
.rihlatk-bw[dir="ltr"] .rihlatk-bw__go svg,
html.rihlatk-is-ltr .rihlatk-bw__go svg {
    transform: scaleX(-1);
}
.rihlatk-bw[dir="ltr"] select,
html.rihlatk-is-ltr .rihlatk-bw select {
    background-position: right 4px center;
}

.rihlatk-bw__extras {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0 4px;
}
.rihlatk-bw__extra {
    flex: 1 1 220px;
    margin-top: 8px;
    background: var(--bw-fill);
    border: 1px solid var(--bw-line);
    border-radius: 12px;
    padding: 8px 12px 10px;
}

@media (max-width: 767px) {
    .rihlatk-bw select,
    .rihlatk-bw input:not([type="checkbox"]):not([type="radio"]) {
        font-size: 16px !important;
    }
}

@container rihlatk-bw (max-width: 980px) {
    .rihlatk-bw__go {
        flex: 1 1 100%;
        min-width: 0;
        min-height: 48px;
    }
}

@media (max-width: 720px) {
    .rihlatk-bw__card {
        padding: 10px;
        border-radius: 18px;
    }
    .rihlatk-bw__modes {
        display: flex;
        width: calc(100% - 4px);
        margin: 0 0 8px;
    }
    .rihlatk-bw__mode {
        flex: 1 1 0;
    }
    .rihlatk-bw__mode span {
        text-align: center;
        padding: 8px 6px;
        font-size: 12px;
    }
    .rihlatk-bw__main {
        border: 0;
        background: transparent;
        gap: 8px;
    }
    .rihlatk-bw__cluster,
    .rihlatk-bw__when,
    .rihlatk-bw__return {
        flex: 1 1 100%;
        background: #fff;
        border: 1px solid var(--bw-line);
        border-radius: 14px;
    }
    .rihlatk-bw__cluster {
        flex-direction: column;
    }
    .rihlatk-bw__when::before,
    .rihlatk-bw__return::before,
    .rihlatk-bw__cluster .rihlatk-bw__cell + .rihlatk-bw__cell::before {
        display: none;
    }
    .rihlatk-bw__origin {
        border-bottom: 1px solid var(--bw-line);
        padding-bottom: 18px;
    }
    .rihlatk-bw__dest {
        padding-top: 18px;
    }
    .rihlatk-bw__swap {
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
    }
    .rihlatk-bw__swap button {
        box-shadow: 0 4px 12px rgba(17, 24, 39, 0.08);
    }
    .rihlatk-bw__when .rihlatk-bw__cell + .rihlatk-bw__cell,
    .rihlatk-bw__return .rihlatk-bw__cell + .rihlatk-bw__cell {
        border-inline-start: 1px solid var(--bw-line);
    }
    .rihlatk-bw__go {
        flex: 1 1 100%;
        min-height: 48px;
        margin: 2px 0 0;
        border-radius: 14px;
    }
}
@media (max-width: 400px) {
    .rihlatk-bw__mode span {
        white-space: normal;
        font-size: 11px;
        padding: 8px 4px;
        line-height: 1.25;
    }
    .rihlatk-bw__cell {
        padding: 8px 12px 10px;
    }
}
