/* ==========================================
   SECTION: FLIGHT SEARCH (template-parts/section-flight-search.php)
   ========================================== */
.dfs,
.dfs * {
    box-sizing: border-box;
}

.dfs {
    --dfs-teal: #30BEB5;
    --dfs-teal-soft: #B6F0EE;
    --dfs-teal-border: #59AEA8;
    --dfs-yellow: #FAB600;
    --dfs-yellow-hover: #E6A700;
    --dfs-green: #18CA01;
    --dfs-green-hover: #16B901;
    --dfs-bg: #EFEFEF;
    --dfs-title: #252525;
    --dfs-text: #454545;
    --dfs-ink: #000000;
    --dfs-label: #303030;
    --dfs-muted: #A3A3A3;
    --dfs-note: #A4A4A4;
    --dfs-line: #DADADA;
    --dfs-shadow: 0 8px 28px rgba(0, 0, 0, .08);

    background: var(--dfs-bg);
    font-family: 'SVN-Gilroy-Regular', sans-serif;
    position: relative;
    overflow: visible;
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
    padding: 64px 20px 80px;
    color: var(--dfs-ink);
}

.dfs button,
.dfs input {
    font-family: 'SVN-Gilroy-Regular', sans-serif;
}

.dfs-in {
    position: relative;
    z-index: 1;
    max-width: 980px;
    margin: 0 auto;
    width: 100%;
    text-align: center;
}

/* Tiêu đề */
.dfs .dfs-h {
    font-family: 'SVN-Gilroy-SemiBold', sans-serif;
    font-size: clamp(2rem, 4vw, 2.8rem);
    font-weight: normal;
    color: var(--dfs-title);
    text-align: center;
    line-height: 1.15;
    margin: 0 0 10px;
    padding: 0;
    display: block;
    width: 100%;
}

.dfs .dfs-h em {
    font-style: normal;
    color: var(--dfs-teal);
}

.dfs .dfs-st {
    text-align: center;
    color: var(--dfs-text);
    font-size: .92rem;
    margin: 0 auto 40px;
    max-width: 520px;
    display: block;
    padding: 0;
    line-height: 1.6;
}

/* Card form */
.dfs-card {
    background: #fff;
    border-radius: 16px;
    padding: 32px 28px 28px;
    box-shadow: var(--dfs-shadow);
}

.dfs-tabs {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
}

.dfs .dfs-tab {
    padding: 7px 18px;
    border-radius: 30px;
    border: 1.5px solid var(--dfs-teal-soft);
    background: var(--dfs-teal-soft);
    color: var(--dfs-teal);
    font-size: .78rem;
    cursor: pointer;
    transition: all .2s;
    line-height: 1.3;
}

.dfs .dfs-tab.active {
    font-family: 'SVN-Gilroy-Bold', sans-serif;
    background: var(--dfs-teal);
    border-color: var(--dfs-teal);
    color: #fff;
}

.dfs .dfs-tab:hover:not(.active) {
    border-color: var(--dfs-teal);
}

/* Hàng ô nhập */
.dfs-row {
    display: grid;
    grid-template-columns: 1fr 40px 1fr 1px 1fr 1fr;
    align-items: stretch;
    background: #fff;
    border: 1.5px solid var(--dfs-teal-border);
    border-radius: 8px;
    margin-bottom: 26px;
    position: relative;
    overflow: visible;
}

.dfs-row.oneway {
    grid-template-columns: 1fr 40px 1fr 1fr;
}

.dfs-row.oneway .dfs-dv,
.dfs-row.oneway .dfs-f-return {
    display: none;
}

.dfs-f {
    padding: 14px 18px;
    position: relative;
    cursor: pointer;
    overflow: visible;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

.dfs-f:not(:last-child) {
    border-right: 1.5px solid var(--dfs-teal-border);
}

.dfs-row.oneway .dfs-f-depart {
    border-right: none;
}

.dfs .dfs-fl {
    font-size: 9px;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--dfs-label);
    display: block;
    margin-bottom: 8px;
}

.dfs .dfs-fv {
    font-family: 'SVN-Gilroy-SemiBold', sans-serif;
    font-size: 1rem;
    color: var(--dfs-ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.dfs .dfs-caret {
    width: 10px;
    height: 10px;
    flex-shrink: 0;
    color: var(--dfs-teal);
}

.dfs .dfs-fi {
    background: none;
    border: none;
    outline: none;
    color: var(--dfs-ink);
    font-family: 'SVN-Gilroy-SemiBold', sans-serif;
    font-size: 1rem;
    width: 100%;
    padding: 0;
    cursor: pointer;
    display: block;
    text-align: center;
    box-shadow: none;
    height: auto;
}

.dfs .dfs-fi::placeholder {
    font-family: 'SVN-Gilroy-Regular', sans-serif;
    color: var(--dfs-teal);
    opacity: 1;
}

.dfs .dfs-fs {
    font-size: .72rem;
    color: var(--dfs-label);
    display: block;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dfs .dfs-to-sub {
    white-space: normal;
}

.dfs .dfs-f-from .dfs-fs.is-empty {
    color: var(--dfs-teal);
}

.dfs-flag {
    width: 20px;
    height: 15px;
    border-radius: 2px;
    object-fit: cover;
    flex-shrink: 0;
    display: inline-block;
    vertical-align: middle;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, .06);
}

.dfs-date-field {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
}

.dfs .dfs-date-val {
    font-family: 'SVN-Gilroy-SemiBold', sans-serif;
    font-size: 1rem;
    color: var(--dfs-ink);
    display: block;
    white-space: nowrap;
}

.dfs-date-icon {
    width: 18px;
    height: 18px;
    color: var(--dfs-teal);
    opacity: .45;
    flex-shrink: 0;
}

.dfs .dfs-sw {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(48, 190, 181, .12);
    border: 1.5px solid rgba(48, 190, 181, .4);
    color: var(--dfs-teal);
    font-size: .85rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .25s;
    justify-self: center;
    align-self: center;
    padding: 0;
    line-height: 1;
}

.dfs .dfs-sw:hover {
    background: var(--dfs-teal);
    color: #fff;
}

.dfs-dv {
    width: 1px;
    height: 40px;
    background: transparent;
    justify-self: center;
    align-self: center;
}

/* Nút Search */
.dfs .dfs-btn {
    width: 100%;
    padding: 16px;
    border-radius: 6px;
    background: var(--dfs-yellow);
    border: none;
    color: #fff;
    font-family: 'SVN-Gilroy-Bold', sans-serif;
    font-size: 1rem;
    letter-spacing: .06em;
    cursor: pointer;
    box-shadow: 0 6px 24px rgba(250, 182, 0, .3);
    transition: all .25s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.dfs .dfs-btn:hover {
    background: var(--dfs-yellow-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 32px rgba(250, 182, 0, .4);
}

.dfs-f-from.dfs-from-error {
    box-shadow: 0 0 0 2px var(--dfs-yellow);
    border-radius: 7px 0 0 7px;
}

.dfs-f-from.dfs-from-error .dfs-fi::placeholder {
    color: var(--dfs-yellow);
}

/* Dropdown chọn thành phố / điểm đến */
.dfs-dd {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    width: 360px;
    max-height: 320px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid var(--dfs-teal);
    border-radius: 14px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .15);
    z-index: 99999;
    text-align: left;
    cursor: default;
    scrollbar-width: thin;
    scrollbar-color: rgba(48, 190, 181, .4) transparent;
}

.dfs-dd[hidden],
.dfs-cal[hidden],
.dfs-results[hidden] {
    display: none;
}

.dfs-dd-to {
    width: 300px;
    left: 50%;
    transform: translateX(-50%);
}

.dfs-dds {
    padding: 12px 14px;
    border-bottom: 1px solid var(--dfs-line);
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 1;
}

.dfs .dfs-dds input {
    width: 100%;
    background: #fff;
    border: 1px solid var(--dfs-line);
    border-radius: 8px;
    padding: 8px 12px;
    color: var(--dfs-ink);
    font-size: .85rem;
    outline: none;
    height: auto;
    box-shadow: none;
}

.dfs .dfs-dds input:focus {
    border-color: var(--dfs-teal);
}

.dfs .dfs-dds input::placeholder {
    color: var(--dfs-muted);
}

.dfs-ci {
    padding: 10px 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background .15s;
}

.dfs-ci:hover,
.dfs-ci.is-selected {
    background: var(--dfs-teal-soft);
}

.dfs-ci.is-empty {
    color: var(--dfs-muted);
    justify-content: center;
    font-size: .82rem;
    cursor: default;
}

.dfs-ci.is-empty:hover {
    background: transparent;
}

.dfs-ci-txt {
    flex: 1;
    min-width: 0;
}

.dfs-cn {
    font-family: 'SVN-Gilroy-SemiBold', sans-serif;
    font-size: .88rem;
    color: var(--dfs-ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dfs-cc {
    font-size: .71rem;
    color: var(--dfs-muted);
}

.dfs-ck {
    font-family: 'SVN-Gilroy-Bold', sans-serif;
    font-size: .8rem;
    color: var(--dfs-teal);
    flex-shrink: 0;
}

/* Lịch */
.dfs-cal {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    width: 300px;
    background: #fff;
    border: 1px solid var(--dfs-teal);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .15);
    z-index: 99999;
    padding: 16px;
    cursor: default;
}

.dfs-cal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.dfs .dfs-cal-nav {
    background: var(--dfs-teal-soft);
    border: none;
    color: var(--dfs-teal);
    width: 28px;
    height: 28px;
    border-radius: 8px;
    cursor: pointer;
    font-size: .9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .2s;
    padding: 0;
}

.dfs .dfs-cal-nav:hover {
    background: var(--dfs-teal);
    color: #fff;
}

.dfs-cal-month {
    font-family: 'SVN-Gilroy-SemiBold', sans-serif;
    font-size: 1rem;
    color: var(--dfs-ink);
}

.dfs-cal-dow {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    margin-bottom: 6px;
}

.dfs-cal-dow span {
    text-align: center;
    font-family: 'SVN-Gilroy-Bold', sans-serif;
    font-size: .65rem;
    color: var(--dfs-muted);
    padding: 4px 0;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.dfs-cal-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}

.dfs .dfs-cal-day {
    text-align: center;
    padding: 7px 2px;
    font-size: .82rem;
    color: var(--dfs-label);
    border-radius: 8px;
    cursor: pointer;
    transition: all .15s;
    border: none;
    background: transparent;
    line-height: 1.2;
}

.dfs .dfs-cal-day:hover:not(:disabled):not(.empty) {
    background: var(--dfs-teal-soft);
    color: var(--dfs-ink);
}

.dfs .dfs-cal-day.today {
    color: var(--dfs-teal);
    font-family: 'SVN-Gilroy-Bold', sans-serif;
}

.dfs .dfs-cal-day.in-range {
    background: rgba(48, 190, 181, .15);
    color: var(--dfs-ink);
    border-radius: 0;
}

.dfs .dfs-cal-day.selected,
.dfs .dfs-cal-day.selected:hover:not(:disabled) {
    background: var(--dfs-teal);
    color: #fff;
    font-family: 'SVN-Gilroy-Bold', sans-serif;
}

.dfs .dfs-cal-day.disabled {
    color: #D0D0D0;
    cursor: default;
}

.dfs .dfs-cal-day.empty {
    cursor: default;
}

/* Kết quả */
.dfs-results {
    margin-top: 28px;
}

.dfs .dfs-section-label {
    text-align: center;
    font-size: 11px;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: var(--dfs-muted);
    margin: 0 0 16px;
    padding: 20px 0 0;
}

.dfs .dfs-route {
    text-align: center;
    font-family: 'SVN-Gilroy-Medium', sans-serif;
    font-size: 1.4rem;
    color: var(--dfs-ink);
    margin: 0 0 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    line-height: 1.3;
}

.dfs .dfs-route .dfs-flag {
    width: 26px;
    height: 19px;
}

.dfs-route-plane {
    width: 22px;
    height: 22px;
    margin: 0 6px;
    color: var(--dfs-ink);
    flex-shrink: 0;
}

.dfs .dfs-route-sub {
    text-align: center;
    font-size: .8rem;
    color: var(--dfs-ink);
    margin: 0 0 24px;
    display: block;
}

.dfs-pg {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 0;
}

.dfs .dfs-pc {
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--dfs-shadow);
    padding: 28px 12px 32px;
    min-height: 122px;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    transition: all .25s;
}

.dfs-pn {
    font-family: 'SVN-Gilroy-Bold', sans-serif;
    font-size: 1.1rem;
    color: var(--dfs-teal);
    text-align: center;
}

.dfs-pt {
    font-size: .8rem;
    color: var(--dfs-muted);
    text-align: center;
    line-height: 1.3;
}

.dfs-pb {
    font-size: .7rem;
    background: var(--dfs-yellow);
    color: #fff;
    padding: 2px 12px;
    border-radius: 10px;
    text-transform: uppercase;
    letter-spacing: .04em;
    line-height: 1.4;
}

.dfs .dfs-pc:hover,
.dfs .dfs-pc.active {
    background: var(--dfs-teal);
}

.dfs .dfs-pc:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, .12);
}

.dfs .dfs-pc:hover .dfs-pn,
.dfs .dfs-pc.active .dfs-pn {
    color: #fff;
}

.dfs .dfs-pc:hover .dfs-pt,
.dfs .dfs-pc.active .dfs-pt {
    color: rgba(255, 255, 255, .85);
}

.dfs .dfs-note {
    text-align: center;
    font-style: italic;
    font-size: .78rem;
    color: var(--dfs-note);
    line-height: 1.6;
    margin: 30px 0 0;
}

.dfs-divider {
    height: 1px;
    background: var(--dfs-line);
    max-width: 490px;
    margin: 40px auto 28px;
}

.dfs .dfs-air-note {
    text-align: center;
    font-size: .85rem;
    color: var(--dfs-ink);
    margin: 0 0 20px;
    display: block;
}

.dfs-dot {
    color: var(--dfs-yellow);
    margin: 0 8px;
}

.dfs-air-filters {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 30px;
}

.dfs .dfs-af {
    min-width: 116px;
    padding: 6px 18px;
    border-radius: 20px;
    border: 1px solid var(--dfs-line);
    background: #fff;
    color: var(--dfs-muted);
    font-size: .8rem;
    cursor: pointer;
    transition: all .2s;
    line-height: 1.4;
}

.dfs .dfs-af.active {
    background: var(--dfs-teal);
    border-color: var(--dfs-teal);
    color: #fff;
}

.dfs .dfs-af:hover:not(.active) {
    border-color: var(--dfs-teal);
    color: var(--dfs-teal);
}

.dfs-ag {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.dfs .dfs-ac {
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--dfs-shadow);
    padding: 26px 10px 22px;
    min-height: 116px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    text-decoration: none;
    transition: all .25s;
    cursor: pointer;
}

.dfs-ac-name {
    font-family: 'SVN-Gilroy-Medium', sans-serif;
    font-size: 1.1rem;
    color: var(--dfs-teal);
    text-align: center;
    line-height: 1.3;
    margin: 0;
}

.dfs-ac-badge {
    font-size: .68rem;
    padding: 1px 10px;
    border-radius: 10px;
    text-transform: uppercase;
    letter-spacing: .04em;
    line-height: 1.4;
}

.dfs-ac-badge.direct {
    background: var(--dfs-yellow);
    color: #fff;
    border: 1px solid var(--dfs-yellow);
}

.dfs-ac-badge.connect {
    background: transparent;
    color: var(--dfs-teal);
    border: 1px solid var(--dfs-teal);
}

.dfs-ac-cta {
    font-size: .68rem;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: .04em;
    opacity: 0;
    transition: opacity .2s;
    margin-top: 2px;
}

.dfs .dfs-ac:hover,
.dfs .dfs-ac.active {
    background: var(--dfs-teal);
}

.dfs .dfs-ac:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, .12);
}

.dfs .dfs-ac:hover .dfs-ac-name,
.dfs .dfs-ac.active .dfs-ac-name {
    font-family: 'SVN-Gilroy-Bold', sans-serif;
    color: #fff;
}

.dfs .dfs-ac:hover .dfs-ac-badge.connect,
.dfs .dfs-ac.active .dfs-ac-badge.connect {
    color: #fff;
    border-color: #fff;
}

.dfs .dfs-ac:hover .dfs-ac-cta,
.dfs .dfs-ac.active .dfs-ac-cta {
    opacity: 1;
}

.dfs-empty {
    text-align: center;
    padding: 48px 20px;
}

.dfs-empty-icon {
    width: 40px;
    height: 40px;
    color: var(--dfs-teal);
    display: block;
    margin: 0 auto 12px;
}

.dfs .dfs-empty-t {
    font-family: 'SVN-Gilroy-SemiBold', sans-serif;
    font-size: 1rem;
    color: var(--dfs-text);
    margin: 0 0 6px;
}

.dfs .dfs-empty-s {
    font-size: .84rem;
    color: var(--dfs-muted);
    margin: 0;
}

/* CTA WhatsApp */
.dfs-cta {
    margin-top: 44px;
    text-align: center;
}

.dfs-cta .dfs-divider {
    margin: 0 auto 40px;
}

.dfs .dfs-cta p {
    color: var(--dfs-ink);
    font-size: .95rem;
    margin: 0 0 14px;
}

.dfs .dfs-cta p strong {
    font-family: 'SVN-Gilroy-Medium', sans-serif;
    font-weight: normal;
    color: var(--dfs-ink);
}

.dfs .dfs-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 34px;
    border-radius: 50px;
    background: var(--dfs-green);
    border: none;
    color: #fff;
    font-family: 'SVN-Gilroy-Bold', sans-serif;
    font-size: 1.05rem;
    text-decoration: none;
    transition: all .25s;
}

.dfs .dfs-cta-btn:hover {
    background: var(--dfs-green-hover);
    color: #fff;
    transform: translateY(-2px);
}

.dfs-cta-btn svg {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

/* ==========================================
   RESPONSIVE
   ========================================== */
@media (max-width: 860px) {
    .dfs {
        padding: 52px 20px 64px;
    }

    .dfs .dfs-h {
        font-size: 2rem;
    }

    .dfs-ag {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 640px) {
    .dfs {
        padding: 44px 16px 56px;
    }

    .dfs .dfs-h {
        font-size: 1.75rem;
    }

    .dfs .dfs-st {
        font-size: .85rem;
        margin-bottom: 28px;
    }

    .dfs-card {
        padding: 20px 14px 18px;
        border-radius: 14px;
    }

    .dfs-row,
    .dfs-row.oneway {
        display: flex;
        flex-direction: column;
        border-radius: 8px;
    }

    .dfs-f,
    .dfs-f:not(:last-child) {
        border-right: none;
        border-bottom: 1.5px solid var(--dfs-teal-border);
        padding: 12px 14px;
    }

    .dfs-f:last-child,
    .dfs-row.oneway .dfs-f-depart {
        border-bottom: none;
    }

    .dfs .dfs-sw,
    .dfs-dv {
        display: none;
    }

    .dfs-f-from.dfs-from-error {
        border-radius: 7px 7px 0 0;
    }

    .dfs-dd,
    .dfs-dd-to {
        width: calc(100vw - 60px);
        left: 0;
        transform: none;
        max-height: 260px;
    }

    .dfs-cal {
        width: calc(100vw - 60px);
        left: 0;
        right: 0;
    }

    .dfs .dfs-route {
        font-size: 1.15rem;
    }

    .dfs-pg {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .dfs-ag {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .dfs .dfs-ac {
        padding: 18px 8px 14px;
        min-height: 100px;
    }

    .dfs .dfs-pc {
        padding: 18px 8px 20px;
        min-height: 100px;
    }

    .dfs .dfs-pn,
    .dfs-ac-name {
        font-size: .95rem;
    }

    .dfs .dfs-btn {
        font-size: .9rem;
        padding: 14px;
    }

    .dfs-air-filters {
        gap: 6px;
    }

    .dfs .dfs-af {
        min-width: 0;
        font-size: .72rem;
        padding: 4px 10px;
    }

    .dfs .dfs-cta-btn {
        font-size: .9rem;
        padding: 11px 22px;
    }
}

@media (max-width: 380px) {
    .dfs .dfs-h {
        font-size: 1.55rem;
    }

    .dfs-pg,
    .dfs-ag {
        grid-template-columns: 1fr 1fr;
    }
}
