/* ===========================================================================
   Departure rows
   ===========================================================================
   Shared by the home-page board and the /trip/fixed-departure page. It used to
   live inside the board's own <style>, which meant the page reused the markup
   and got none of the styling — the rows only looked right where the block
   happened to be placed.

   The board keeps its own heading and inline search bar; everything a row is
   made of is here.

   Palette follows the site: #ef8821 for actions and #3c59a7 for structure.
   ========================================================================= */

.fd-list { display: flex; flex-direction: column; gap: 6px; }
.fd-row {
    background: #fff; border: 1px solid #e3e6ec; border-radius: 4px;
    display: flex; align-items: center; overflow: hidden;
    transition: box-shadow .15s ease, border-color .15s ease;
}
.fd-row:hover { border-color: #ef8821; box-shadow: 0 2px 8px rgba(60,89,167,.12); }

/* The date reads as one line — "19 AUG 26". Stacking day, month and year
   forced every row to be tall enough for three lines of text, which is what
   made the board feel like a column of boxes rather than a list. */
.fd-date {
    flex: 0 0 auto; align-self: stretch;
    background: #3c59a7; color: #fff;
    display: flex; align-items: center; gap: 6px;
    padding: 0 13px; white-space: nowrap;
}
.fd-date .dd { font-size: 18px; font-weight: 700; line-height: 1; }
.fd-date .mm {
    font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em;
    color: #ef8821; font-weight: 700;
}
.fd-date .yy { font-size: 11px; opacity: .62; }

.fd-main { flex: 1; padding: 7px 14px; min-width: 0; }
.fd-main h3 { margin: 0 0 2px; font-size: 14.5px; line-height: 1.25; }
.fd-main h3 a { color: #3c59a7; text-decoration: none; font-weight: 700; }
.fd-main h3 a:hover { color: #ef8821; }

.fd-meta {
    list-style: none; margin: 0; padding: 0;
    display: flex; flex-wrap: wrap; gap: 3px 14px;
}
.fd-meta li { font-size: 12px; color: #5a6472; line-height: 1.5; }
.fd-meta i { color: #ef8821; margin-right: 4px; width: 12px; }

/* Return date sits inline with the rest rather than on its own line. */
.fd-meta li.fd-return { color: #8a919c; }

/* Price and action side by side, so this column adds no height of its own. */
.fd-book {
    flex: 0 0 auto; border-left: 1px dashed #e3e6ec; align-self: stretch;
    padding: 7px 14px;
    display: flex; align-items: center; gap: 13px;
}
.fd-price { font-size: 17px; font-weight: 700; color: #3c59a7; line-height: 1.1; text-align: right; }
.fd-price .cur { font-size: 12px; vertical-align: super; margin-right: 1px; }
.fd-price small { display: block; font-size: 10px; font-weight: 400; color: #8a919c; }
.fd-price-ask { font-size: 13px; color: #5a6472; }
.fd-actions { display: flex; flex-direction: column; align-items: center; gap: 3px; }

.fd-btn {
    display: inline-block; background: #ef8821; color: #fff !important;
    padding: 6px 16px; border-radius: 3px; font-size: 13px; font-weight: 600;
    text-decoration: none; white-space: nowrap;
}
.fd-btn:hover { background: #d9761a; color: #fff; text-decoration: none; }

.fd-flag { font-size: 10.5px; color: #6c757d; }
.fd-flag-soon { color: #c0392b; font-weight: 600; }

.fd-more-wrap { text-align: center; margin-top: 16px; }
.fd-more {
    background: #fff; border: 1px solid #3c59a7; color: #3c59a7;
    padding: 10px 26px; border-radius: 3px; font-size: 14px; font-weight: 600;
    cursor: pointer;
}
.fd-more:hover { background: #3c59a7; color: #fff; }

.fd-empty, .fd-none {
    background: #fff; border: 1px solid #e3e6ec; border-radius: 4px;
    padding: 34px 20px; text-align: center; color: #5a6472;
}
.fd-none { margin-top: 10px; }
.fd-empty p { margin: 0 0 16px; }

@media (max-width: 767px) {
    .fd-row { flex-wrap: wrap; }
    .fd-date { flex: 0 0 100%; flex-direction: row; gap: 8px; padding: 9px; }
    .fd-date .dd { font-size: 19px; }
    .fd-date .mm, .fd-date .yy { margin-top: 0; font-size: 13px; }
    .fd-book {
        flex: 0 0 100%; border-left: 0; border-top: 1px dashed #e3e6ec;
        flex-direction: row; justify-content: space-between; text-align: left;
    }
    .fd-field { flex: 1 1 100%; }
}

@media (prefers-reduced-motion: reduce) { .fd-row { transition: none; } }

/* ===========================================================================
   Board layout — filters left, departures right
   ========================================================================= */
.fd-shell { position: relative; }

.fd-head { text-align: center; margin-bottom: 26px; }
.fd-head h2 {
    font-size: 26px; font-weight: 700; color: #3c59a7; margin: 0 0 8px; line-height: 1.25;
}
.fd-head p { color: #5a6472; font-size: 15px; margin: 0; }

.fd-layout { display: grid; grid-template-columns: 268px 1fr; gap: 26px; align-items: start; }

/* -------------------------------------------------------------- filters */
.fd-side { position: sticky; top: 20px; }
.fd-filters { background: #fff; border: 1px solid #e3e6ec; border-radius: 4px; padding: 18px; }

.fd-side-head {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid #eef1f4;
}
.fd-side-head h3 {
    font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em;
    color: #3c59a7; margin: 0;
}
.fd-clear {
    border: 0; background: none; padding: 0; cursor: pointer;
    font: inherit; font-size: 12.5px; font-weight: 600; color: #ef8821;
}
.fd-clear:hover { text-decoration: underline; }

.fd-group { margin-bottom: 14px; }
.fd-group label {
    display: block; font-size: 11.5px; font-weight: 700; text-transform: uppercase;
    letter-spacing: .06em; color: #5a6472; margin-bottom: 6px;
}
.fd-group select {
    width: 100%; padding: 9px 10px; font: inherit; font-size: 14px;
    color: #1a2b48; background: #fff; border: 1px solid #d7dce3; border-radius: 3px;
}
.fd-group select:focus {
    outline: none; border-color: #ef8821; box-shadow: 0 0 0 3px rgba(239,136,33,.16);
}

.fd-count {
    margin: 16px 0 0; padding-top: 13px; border-top: 1px solid #eef1f4;
    font-size: 12.5px; color: #5a6472; font-weight: 600;
}

/* ------------------------------------------------------------- ask card */
.fd-ask-card {
    margin-top: 18px; padding: 15px; background: #f2f4f9;
    border-radius: 4px; border-left: 3px solid #3c59a7;
}
.fd-ask-card strong { display: block; font-size: 13.5px; color: #1a2b48; margin-bottom: 5px; }
.fd-ask-card p { margin: 0 0 11px; font-size: 12.5px; color: #5a6472; line-height: 1.55; }
.fd-ask-btn, .fd-ask-send {
    display: inline-block; padding: 9px 16px; background: #ef8821; color: #fff;
    border: 0; border-radius: 3px; font: inherit; font-size: 13px; font-weight: 600;
    cursor: pointer; text-decoration: none;
}
.fd-ask-btn:hover, .fd-ask-send:hover { filter: brightness(.93); color: #fff; }
.fd-ask-send[disabled] { opacity: .6; cursor: progress; }

.fd-none { text-align: center; padding: 30px 16px; color: #5a6472; }
.fd-none p { margin: 0 0 14px; }

/* ============================================================ enquiry popup
   Deliberately not shaped like the contact page. Someone who has just filtered
   a board is answering a question, not filling in a form, so the answers are
   chips and only the name and email are typed.
   ========================================================================= */
.fd-ask {
    position: fixed; inset: 0; z-index: 9000;
    display: flex; align-items: center; justify-content: center;
}
.fd-ask[hidden] { display: none; }
.fd-ask-scrim { position: absolute; inset: 0; background: rgba(26,43,72,.55); }

.fd-ask-dialog {
    position: relative; z-index: 1; width: 100%; max-width: 600px; max-height: 92vh;
    overflow-y: auto; background: #fff; border-radius: 5px;
    box-shadow: 0 24px 60px -20px rgba(26,43,72,.5);
    animation: fd-rise .2s cubic-bezier(.2,.7,.3,1);
}
.fd-ask-form, .fd-ask-done { padding: 28px 30px 24px; }

.fd-ask-x {
    position: absolute; top: 8px; right: 12px; z-index: 2;
    border: 0; background: none; font-size: 26px; line-height: 1;
    color: #8a919c; cursor: pointer; padding: 4px 8px; border-radius: 4px;
}
.fd-ask-x:hover { background: #f1f3f7; color: #1a2b48; }

.fd-ask-head h2 { margin: 0 0 6px; font-size: 22px; color: #3c59a7; font-weight: 700; line-height: 1.25; }
.fd-ask-head p  { margin: 0 0 20px; color: #5a6472; font-size: 14px; line-height: 1.55; }

.fd-ask-set { border: 0; padding: 0; margin: 0 0 16px; }
.fd-ask-set legend {
    padding: 0; margin-bottom: 8px; font-size: 11.5px; font-weight: 700;
    text-transform: uppercase; letter-spacing: .06em; color: #5a6472;
}
.fd-ask-set legend em { font-style: normal; font-weight: 500; text-transform: none; letter-spacing: 0; color: #8a919c; }

/* Chips: the whole label is the target, so a tap never misses. */
.fd-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.fd-chip { position: relative; cursor: pointer; }
.fd-chip input {
    position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer;
}
.fd-chip span {
    display: block; padding: 8px 14px; border: 1px solid #d7dce3; border-radius: 20px;
    font-size: 13.5px; color: #1a2b48; background: #fff;
    transition: border-color .12s ease, background .12s ease, color .12s ease;
}
.fd-chip:hover span { border-color: #ef8821; }
.fd-chip input:checked + span { background: #ef8821; border-color: #ef8821; color: #fff; font-weight: 600; }
.fd-chip input:focus-visible + span { outline: 2px solid #3c59a7; outline-offset: 2px; }

.fd-ask-you {
    display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px;
    margin-top: 20px; padding-top: 18px; border-top: 1px solid #eef1f4;
}
.fd-ask-field { margin-bottom: 14px; }
.fd-ask-field:first-child, .fd-ask-field:nth-child(2) { grid-column: auto; }
.fd-ask-field:nth-child(3) { grid-column: 1 / -1; }
.fd-ask-field label {
    display: block; font-size: 12px; font-weight: 700; color: #1a2b48; margin-bottom: 5px;
}
.fd-ask-field label em { font-style: normal; font-weight: 500; color: #8a919c; }
.fd-ask-field input {
    width: 100%; padding: 10px 12px; font: inherit; font-size: 14.5px;
    color: #1a2b48; border: 1px solid #d7dce3; border-radius: 3px;
}
.fd-ask-field input:focus {
    outline: none; border-color: #ef8821; box-shadow: 0 0 0 3px rgba(239,136,33,.16);
}

/* Closed by default: the one field that asks for prose should be opt-in. */
.fd-ask-note { margin-bottom: 6px; }
.fd-ask-note summary {
    cursor: pointer; font-size: 13.5px; font-weight: 600; color: #3c59a7; padding: 4px 0;
}
.fd-ask-note textarea {
    width: 100%; margin-top: 8px; padding: 10px 12px; font: inherit; font-size: 14.5px;
    color: #1a2b48; border: 1px solid #d7dce3; border-radius: 3px; resize: vertical; line-height: 1.55;
}
.fd-ask-note textarea:focus { outline: none; border-color: #ef8821; }

.fd-ask-actions {
    display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
    margin-top: 18px; padding-top: 16px; border-top: 1px solid #eef1f4;
}
.fd-ask-privacy { flex: 1; margin: 0; font-size: 12px; color: #8a919c; }
.fd-ask-send { padding: 12px 26px; font-size: 14.5px; }

.fd-ask-error {
    margin: 14px 0 0; padding: 10px 12px; border-radius: 3px;
    background: #fdecea; color: #b3261e; font-size: 13.5px;
}

.fd-ask-done { text-align: center; padding: 44px 30px 36px; }
.fd-ask-tick {
    width: 52px; height: 52px; margin: 0 auto 16px; border-radius: 50%;
    background: rgba(239,136,33,.12); color: #ef8821;
    display: grid; place-items: center; font-size: 26px; font-weight: 700;
}
.fd-ask-done h3 { margin: 0 0 8px; color: #3c59a7; font-size: 20px; }
.fd-ask-done p  { margin: 0 0 22px; color: #5a6472; font-size: 14.5px; line-height: 1.6; }

.fd-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

@keyframes fd-rise { from { opacity: 0; transform: translateY(14px) } to { opacity: 1; transform: none } }

/* ---------------------------------------------------------- responsive */
@media (max-width: 900px) {
    .fd-layout { grid-template-columns: 1fr; }
    /* Sticky here would pin the filters over the results they filter. */
    .fd-side { position: static; }
    .fd-filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0 14px; }
    .fd-side-head, .fd-count, .fd-ask-card { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
    .fd-ask { align-items: flex-end; }
    .fd-ask-dialog { max-height: 94vh; border-radius: 12px 12px 0 0; }
    .fd-ask-form { padding: 24px 18px 20px; }
    .fd-ask-head h2 { font-size: 19px; }
    .fd-ask-you { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
    .fd-ask-dialog { animation: none; }
}
