/* ==========================================================================
   Bus tickets (FlixBus)
   --------------------------------------------------------------------------
   A timetable, not a brochure. Departure times are the biggest thing on the
   page, prices sit at the right where the eye finishes a row, and the
   colour is FlixBus's own green used sparingly for the one thing you can do
   on each row - select it.

   Scoped under .fx. Uses only what layout.phtml already loads: Bootstrap 5,
   Bootstrap Icons, Lora / Lato / Raleway, jQuery + daterangepicker/moment.
   ========================================================================== */

.fx {
    --fx-green:   #73d700;
    --fx-green-d: #5cad00;
    --fx-green-l: #eefbdd;
    --fx-ink:     #1f2a1a;
    --fx-muted:   #6b7770;
    --fx-line:    #e1e6e2;
    --fx-paper:   #fbfcfa;
    --fx-deep:    #17331b;
    --fx-warn-bg: #fff6e0;
    --fx-warn:    #7a5200;
    --fx-bad-bg:  #fdeceb;
    --fx-bad:     #a12b22;
    --fx-radius:  12px;
    --fx-shadow:  0 1px 2px rgba(23, 51, 27, .05), 0 10px 28px rgba(23, 51, 27, .07);
    color: var(--fx-ink);
}

.fx h1, .fx h2, .fx h3 { font-family: 'Lora', Georgia, serif; font-weight: 600; letter-spacing: -.01em; color: var(--fx-deep); }
.fx .fx-eyebrow { font-family: 'Raleway', sans-serif; font-size: .72rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--fx-green-d); }
.fx .fx-muted { color: var(--fx-muted); }
.fx .fx-link { color: var(--fx-green-d); text-decoration: none; }
.fx .fx-link:hover { text-decoration: underline; }
.fx .fx-req { color: var(--fx-bad); }
.fx .fx-optional { font-size: .75rem; color: var(--fx-muted); font-weight: 400; margin-left: .25rem; }
.fx .fx-tag { display: inline-block; font-size: .7rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; padding: .15rem .5rem; border-radius: 999px; background: var(--fx-green-l); color: var(--fx-green-d); vertical-align: middle; margin-left: .35rem; }

/* ------------------------------------------------------------ buttons */

.fx .fx-btn { border-radius: 999px; font-weight: 600; padding: .6rem 1.35rem; border: 1px solid transparent; transition: background .15s, transform .1s; }
.fx .fx-btn-go { background: var(--fx-green); color: var(--fx-deep); }
.fx .fx-btn-go:hover { background: var(--fx-green-d); color: #fff; }
.fx .fx-btn-go:disabled { opacity: .7; }
.fx .fx-btn-select { background: var(--fx-green); color: var(--fx-deep); padding: .45rem 1.2rem; }
.fx .fx-btn-select:hover { background: var(--fx-green-d); color: #fff; }
.fx .fx-btn-ghost { background: #fff; border-color: var(--fx-line); color: var(--fx-ink); }
.fx .fx-btn-ghost:hover { border-color: var(--fx-green-d); color: var(--fx-green-d); }

/* --------------------------------------------------------------- hero */

.fx-hero { background: var(--fx-deep) radial-gradient(1200px 500px at 80% -20%, rgba(115, 215, 0, .35), transparent 60%); color: #fff; padding: 4.5rem 0 3.5rem; }
.fx-hero .fx-eyebrow { color: var(--fx-green); }
.fx-hero h1 { color: #fff; font-size: clamp(1.9rem, 3.6vw, 2.9rem); line-height: 1.15; max-width: 720px; }
.fx-hero-sub { color: rgba(255, 255, 255, .78); max-width: 640px; margin-bottom: 2rem; }

.fx-searchbar { background: #fff; color: var(--fx-ink); border-radius: var(--fx-radius); padding: 1.1rem; box-shadow: var(--fx-shadow); }
.fx-searchbar-grid { display: grid; grid-template-columns: 1.3fr auto 1.3fr 1.5fr 1.3fr auto; gap: .75rem; align-items: end; }
.fx-triptype { display: flex; gap: .4rem; margin-bottom: .8rem; }
.fx-triptype .btn { border-radius: 999px; padding: .3rem 1rem; font-size: .85rem; font-weight: 600; border: 1px solid var(--fx-line); color: var(--fx-muted); background: #fff; }
.fx-triptype .btn-check:checked + .btn { background: var(--fx-deep); border-color: var(--fx-deep); color: #fff; }
.fx-triptype .btn-check:focus-visible + .btn { box-shadow: 0 0 0 .2rem rgba(115, 215, 0, .35); }
.fx-searchbar .fx-field label { display: block; font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--fx-muted); margin-bottom: .3rem; }
.fx-searchbar .form-control, .fx-searchbar .form-select, .fx-searchbar .input-group-text { min-height: 46px; }
.fx-city { position: relative; }
/* .fx-city only anchors the suggestion list; the field inside is a plain
   Bootstrap input-group with the icon in its own box and the site's own
   focus ring, like every other field on the site. */
.fx-swap { align-self: end; height: 46px; width: 40px; border: 1px solid var(--fx-line); background: #fff; border-radius: .375rem; color: var(--fx-muted); }
.fx-swap:hover { color: var(--fx-green-d); border-color: var(--fx-green-d); }
.fx-pax { display: grid; grid-template-columns: 1fr 1fr; gap: .4rem; }
.fx-field-go .fx-btn { min-height: 46px; white-space: nowrap; }
.fx-searchbar-note { margin-top: .6rem; font-size: .85rem; color: var(--fx-bad); }
.fx-searchbar input[readonly] { background: #fff; cursor: pointer; }

@media (max-width: 1199.98px) { .fx-searchbar-grid { grid-template-columns: 1fr auto 1fr; } .fx-searchbar-grid .fx-field-pax, .fx-searchbar-grid .fx-field-go { grid-column: span 3; } }
@media (max-width: 767.98px) { .fx-searchbar-grid { grid-template-columns: 1fr; } .fx-swap { display: none; } .fx-searchbar-grid .fx-field-pax, .fx-searchbar-grid .fx-field-go { grid-column: auto; } .fx-hero { padding: 3rem 0 2.5rem; } }

/* suggestions - same look as the Hotels destination helper on the site:
   white panel, #CCC hairline, soft shadow, 13px rows with a grey icon, a
   bold name and a blue description underneath, amber hover. */
.fx-suggest-list { position: absolute; z-index: 1050; left: 0; right: 0; top: calc(100% + 4px); background: #fff; border: 1px solid #CCC; border-radius: .375rem; box-shadow: 0 .5rem 1rem 0 rgba(10, 10, 10, .15); padding: 10px 0; max-height: 340px; overflow-y: auto; text-align: left; }
.fx-suggest-item { display: flex; align-items: flex-start; width: 100%; text-align: left; margin-bottom: 3px; font-size: 13px; line-height: 1.35; padding: 5px 14px; border: 0; background: #fff; color: #212529; cursor: pointer; }
.fx-suggest-item:hover, .fx-suggest-item.fx-active { background: #fff3de; }
.fx-suggest-item .fx-suggest-icon { padding-right: 12px; padding-top: 1px; color: #888; }
.fx-suggest-item .fx-suggest-icon .bi { color: #888; }
.fx-suggest-item .fx-suggest-name { font-weight: 600; }
.fx-suggest-item .fx-suggest-desc { font-size: 12px; color: #055c9d; }
.fx-suggest-empty { padding: 4px 15px; color: #888; font-size: 13px; }

/* why */
.fx-why { padding: 3rem 0 1rem; }
.fx-why-item { padding: 1.25rem; border: 1px solid var(--fx-line); border-radius: var(--fx-radius); background: #fff; height: 100%; }
.fx-why-item i { font-size: 1.6rem; color: var(--fx-green-d); }
.fx-why-item h3 { font-size: 1.05rem; margin: .5rem 0 .3rem; }
.fx-why-item p { margin: 0; color: var(--fx-muted); font-size: .92rem; }

/* ------------------------------------------------------------ results */

.fx-summary { background: #fff; border: 1px solid var(--fx-line); border-radius: var(--fx-radius); padding: .9rem 1.1rem; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem 1.5rem; }
.fx-summary-route { display: flex; align-items: center; gap: .6rem; font-family: 'Lora', Georgia, serif; font-size: 1.25rem; font-weight: 600; color: var(--fx-deep); }
.fx-summary-route .bi { color: var(--fx-green-d); }
.fx-summary-facts { display: flex; flex-wrap: wrap; gap: 1rem; font-size: .9rem; color: var(--fx-muted); align-items: center; }
.fx-summary-facts .bi { color: var(--fx-green-d); margin-right: .25rem; }
.fx-summary-edit { color: var(--fx-green-d); text-decoration: none; font-weight: 600; }

.fx-legs { list-style: none; padding: 0; margin: 1.25rem 0 0; display: flex; gap: .5rem; flex-wrap: wrap; }
.fx-legs li { display: flex; align-items: center; gap: .5rem; padding: .4rem .9rem .4rem .5rem; border-radius: 999px; border: 1px solid var(--fx-line); color: var(--fx-muted); font-size: .88rem; background: #fff; }
.fx-legs .fx-leg-n { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--fx-line); color: var(--fx-ink); font-size: .75rem; font-weight: 700; }
.fx-legs .fx-leg-on { border-color: var(--fx-green-d); color: var(--fx-deep); font-weight: 600; }
.fx-legs .fx-leg-on .fx-leg-n, .fx-legs .fx-leg-done .fx-leg-n { background: var(--fx-green); color: var(--fx-deep); }
.fx-legs .fx-leg-done { color: var(--fx-green-d); }

.fx-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: .75rem; }
.fx-sort { display: flex; gap: .25rem; align-items: center; }
.fx-sort-opt { padding: .25rem .7rem; border-radius: 999px; font-size: .85rem; color: var(--fx-muted); text-decoration: none; border: 1px solid transparent; }
.fx-sort-opt:hover { color: var(--fx-green-d); }
.fx-sort-on { background: var(--fx-green-l); color: var(--fx-green-d); font-weight: 600; }

.fx-trips { display: flex; flex-direction: column; gap: .7rem; }
.fx-trip { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "times price" "meta price"; gap: .35rem 1.25rem; background: #fff; border: 1px solid var(--fx-line); border-radius: var(--fx-radius); padding: 1rem 1.15rem; transition: box-shadow .15s, border-color .15s; }
.fx-trip:hover { box-shadow: var(--fx-shadow); border-color: #c9d4cc; }
.fx-trip-chosen { border-color: var(--fx-green-d); background: linear-gradient(90deg, var(--fx-green-l), #fff 40%); }
.fx-trip-off { opacity: .6; }
.fx-trip-times { grid-area: times; display: grid; grid-template-columns: minmax(110px, 1fr) minmax(120px, 1.6fr) minmax(110px, 1fr); align-items: center; gap: .75rem; }
.fx-trip-time { font-family: 'Lora', Georgia, serif; font-size: 1.55rem; font-weight: 600; line-height: 1.1; color: var(--fx-deep); }
.fx-trip-time .fx-plus, .fx-plus { font-size: .65rem; color: var(--fx-bad); font-family: 'Lato', sans-serif; margin-left: .15rem; }
.fx-trip-station { font-size: .82rem; color: var(--fx-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fx-trip-end-arr { text-align: right; }
.fx-trip-line { display: flex; flex-direction: column; align-items: center; font-size: .78rem; color: var(--fx-muted); }
.fx-trip-rail { width: 100%; height: 2px; background: var(--fx-line); position: relative; margin: .2rem 0; }
.fx-trip-rail i { position: absolute; left: 50%; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: #fff; border: 2px solid var(--fx-green-d); transform: translateX(-50%); }
.fx-trip-stops-some { color: var(--fx-warn); font-weight: 600; }
.fx-trip-meta { grid-area: meta; display: flex; flex-wrap: wrap; gap: .4rem 1rem; font-size: .8rem; color: var(--fx-muted); }
.fx-trip-meta .bi { margin-right: .2rem; }
.fx-trip-scarce { color: var(--fx-bad); font-weight: 600; }
.fx-trip-price { grid-area: price; display: flex; flex-direction: column; align-items: flex-end; justify-content: center; gap: .15rem; min-width: 140px; border-left: 1px solid var(--fx-line); padding-left: 1.25rem; }
.fx-trip-total { font-family: 'Lora', Georgia, serif; font-size: 1.45rem; font-weight: 600; color: var(--fx-deep); }
.fx-trip-pp { font-size: .78rem; color: var(--fx-muted); margin-bottom: .3rem; }
.fx-trip-soldout { font-size: .85rem; font-weight: 600; color: var(--fx-muted); }
.fx-trip-chosen-tag { color: var(--fx-green-d); font-weight: 600; font-size: .9rem; }
@media (max-width: 575.98px) {
    .fx-trip { grid-template-columns: 1fr; grid-template-areas: "times" "meta" "price"; }
    .fx-trip-price { border-left: 0; border-top: 1px solid var(--fx-line); padding: .6rem 0 0; flex-direction: row; align-items: center; justify-content: space-between; }
    .fx-trip-time { font-size: 1.3rem; }
}

.fx-empty { text-align: center; padding: 3rem 1rem; background: #fff; border: 1px dashed var(--fx-line); border-radius: var(--fx-radius); }
.fx-empty > .bi { font-size: 2.4rem; color: var(--fx-green-d); }
.fx-empty-page { max-width: 640px; margin: 0 auto; }
.fx-daynav { display: flex; gap: .6rem; justify-content: center; margin-top: 1rem; }

.fx-note { border-radius: var(--fx-radius); padding: .8rem 1rem; font-size: .92rem; background: var(--fx-green-l); color: var(--fx-deep); }
.fx-note-warn { background: var(--fx-warn-bg); color: var(--fx-warn); }
.fx-note-bad { background: var(--fx-bad-bg); color: var(--fx-bad); }

/* ------------------------------------------------------------ filters */

.fx-filters { position: sticky; top: 1rem; background: #fff; border: 1px solid var(--fx-line); border-radius: var(--fx-radius); padding: 1rem 1.1rem; }
.fx-filters-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: .5rem; }
.fx-filters-clear { background: none; border: 0; padding: 0; color: var(--fx-green-d); }
.fx-filter { border: 0; padding: .75rem 0; margin: 0; border-top: 1px solid var(--fx-line); }
.fx-filter legend { float: left; width: 100%; font-size: .78rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--fx-muted); margin-bottom: .45rem; padding: 0; }
.fx-filter-opt { display: flex; align-items: center; gap: .55rem; padding: .3rem 0; cursor: pointer; font-size: .92rem; }
.fx-filter-opt input { accent-color: var(--fx-green-d); width: 16px; height: 16px; margin: 0; flex: none; }
.fx-filter-label { flex: 1; }
.fx-filter-label small { display: block; color: var(--fx-muted); font-size: .74rem; }
.fx-filter-count { font-size: .76rem; color: var(--fx-muted); background: var(--fx-paper); border: 1px solid var(--fx-line); border-radius: 999px; padding: 0 .5rem; min-width: 26px; text-align: center; }
.fx-filter-none { opacity: .45; cursor: default; }
.fx-filters-foot { border-top: 1px solid var(--fx-line); padding-top: .6rem; }
.fx-trip-hidden { display: none !important; }
.fx-empty-filtered { margin-top: .5rem; }
@media (max-width: 991.98px) { .fx-filters { position: static; } .fx-filter-opt { padding: .2rem 0; } }

/* ------------------------------------------------- homepage search tab */

/* The site's hero styles paint every .input-group-text icon #efefef - close
   to invisible on the 90%-white box. Scoped to the Bus tab so nothing else
   on the homepage changes. */
.mainHero #tabbus .input-group-text { color: #4a4a4a; }
.mainHero #tabbus .fx-suggest-list, .mainHero .sbx .fx-suggest-list { min-width: 380px; max-width: 520px; right: auto; z-index: 20; }
@media (max-width: 575.98px) { .mainHero #tabbus .fx-suggest-list, .mainHero .sbx .fx-suggest-list { min-width: 0; right: 0; } }

/* -------------------------------------------------------------- forms */

.fx-block { background: #fff; border: 1px solid var(--fx-line); border-radius: var(--fx-radius); overflow: hidden; }
.fx-block-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding: .8rem 1.1rem; background: var(--fx-paper); border-bottom: 1px solid var(--fx-line); }
.fx-block-head h2 { font-family: 'Lato', sans-serif; font-weight: 700; color: var(--fx-ink); }
.fx-block-body { padding: 1.1rem; }
.fx-sub-head { font-size: .8rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--fx-muted); padding-top: .4rem; border-top: 1px dashed var(--fx-line); }
.fx .form-check-input:checked { background-color: var(--fx-green-d); border-color: var(--fx-green-d); }
.fx-field-note { font-size: .8rem; color: var(--fx-bad); margin-top: .25rem; }
.fx-field-hint { font-size: .78rem; color: var(--fx-muted); margin-top: .25rem; }
.fx-check-bad { padding: .5rem; border-radius: 8px; background: var(--fx-bad-bg); }
.fx-actions { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-top: .5rem; }

.fx-paxlist .fx-paxrow { display: flex; align-items: center; gap: .6rem; padding: .35rem 0; }
.fx-paxrow-n { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--fx-green-l); color: var(--fx-green-d); font-size: .78rem; font-weight: 700; }
.fx-paxrow-name { font-weight: 600; }

.fx-method { display: flex; align-items: center; gap: .9rem; padding: .85rem 1rem; border: 1px solid var(--fx-line); border-radius: 10px; margin-bottom: .6rem; cursor: pointer; background: #fff; }
.fx-method-on { border-color: var(--fx-green-d); background: var(--fx-green-l); }
.fx-method-text { display: flex; flex-direction: column; }
.fx-method-label { font-weight: 600; }
.fx-method-note { font-size: .82rem; color: var(--fx-muted); }
.fx-method-marks { margin-left: auto; display: flex; gap: .35rem; }
.fx-card-input { position: relative; }
.fx-card-brand { position: absolute; right: .7rem; top: 50%; transform: translateY(-50%); font-size: .75rem; font-weight: 700; color: var(--fx-green-d); letter-spacing: .04em; }

/* -------------------------------------------------------------- panel */

.fx-panel { position: sticky; top: 1rem; background: #fff; border: 1px solid var(--fx-line); border-radius: var(--fx-radius); padding: 1.1rem; box-shadow: var(--fx-shadow); }
.fx-panel-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: .6rem; }
.fx-timer { font-size: .8rem; font-weight: 700; color: var(--fx-warn); background: var(--fx-warn-bg); border-radius: 999px; padding: .15rem .6rem; }
.fx-timer-late { color: var(--fx-bad); background: var(--fx-bad-bg); }
.fx-panel-trip { padding: .75rem 0; border-top: 1px solid var(--fx-line); }
.fx-panel-leg { font-size: .75rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--fx-green-d); margin-bottom: .4rem; }
.fx-panel-route { display: grid; grid-template-columns: 1fr auto 1fr; gap: .6rem; align-items: start; }
.fx-panel-route > div { display: flex; flex-direction: column; }
.fx-panel-route strong { font-family: 'Lora', Georgia, serif; font-size: 1.15rem; color: var(--fx-deep); }
.fx-panel-route span { font-weight: 600; font-size: .92rem; }
.fx-panel-route small { color: var(--fx-muted); font-size: .76rem; }
.fx-panel-arrow { text-align: center; color: var(--fx-muted); padding-top: .3rem; }
.fx-panel-arrow small { display: block; font-size: .72rem; }
.fx-panel-facts { font-size: .8rem; color: var(--fx-muted); margin-top: .4rem; }
.fx-panel-price { border-top: 2px solid var(--fx-deep); padding-top: .75rem; margin-top: .25rem; }
.fx-panel-row { display: flex; justify-content: space-between; font-size: .88rem; color: var(--fx-muted); }
.fx-panel-total { display: flex; justify-content: space-between; align-items: baseline; margin: .35rem 0 .35rem; }
.fx-panel-total strong { font-family: 'Lora', Georgia, serif; font-size: 1.6rem; color: var(--fx-deep); }

/* --------------------------------------------------------------- done */

.fx-done { text-align: center; padding: 1.5rem 0 2rem; }
.fx-done-mark { display: inline-grid; place-items: center; width: 72px; height: 72px; border-radius: 50%; background: var(--fx-green-l); color: var(--fx-green-d); font-size: 2.2rem; margin-bottom: .75rem; }
.fx-refs { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; }
.fx-ref { display: flex; flex-direction: column; }
.fx-ref-label { font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--fx-muted); }
.fx-ref-value { font-weight: 600; font-size: 1.05rem; }
.fx-ref-big { font-family: 'Lora', Georgia, serif; font-size: 1.7rem; color: var(--fx-deep); letter-spacing: .02em; }
.fx-prose p { margin-bottom: .6rem; font-size: .93rem; }

/* busy overlay while Flix issue the ticket */
.fx-busy { position: fixed; inset: 0; z-index: 2000; background: rgba(23, 51, 27, .82); color: #fff; display: grid; place-items: center; text-align: center; padding: 2rem; }
.fx-busy .spinner-border { width: 3rem; height: 3rem; color: var(--fx-green); margin-bottom: 1rem; }
.fx-busy h2 { color: #fff; }

/* ------------------------------------------------------ processing page */
.fx-wait-mark .spinner-border { width: 2.4rem; height: 2.4rem; border-width: .3em; }
.fx-bad-mark { color: var(--fx-bad); }
.fx-steps { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; margin: 1rem 0; }
.fx-step { display: inline-flex; align-items: center; gap: .35rem; padding: .3rem .8rem; border-radius: 999px; border: 1px solid var(--fx-line); background: #fff; color: var(--fx-muted); font-size: .8rem; font-weight: 600; }
.fx-step.is-on { border-color: var(--fx-green-d); color: var(--fx-green-d); }
.fx-step.is-now { background: var(--fx-green-d); color: #fff; }
.fx-voucher-frame { border-top: 1px solid var(--fx-line); background: #f4f6f8; }
.fx-voucher-frame iframe { display: block; width: 100%; height: 720px; border: 0; }
@media (max-width: 767.98px) { .fx-voucher-frame iframe { height: 520px; } }
