/*
* Estimated route prices: airport cards (card-airport.php) and price pages (modules/routePrices.php).
* Separate file with a file-time version, so changes reach visitors without a main.css rebuild.
*/

/* Airport card */
.card--airport .card__column > .wrapper:last-child {
    margin-top: auto; /* Button at the bottom, also when cards in the slider have different heights */
}

.card--airport .card__prices {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1.5rem;
    padding: 1rem 1.25rem;
    border-radius: 8px;
    background-color: rgba(185, 169, 141, 0.16);
}

.card--airport .card__price-main {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.25rem 1rem;
}

.card--airport .card__price-origin {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-weight: 600;
}

.card--airport .card__price-origin .icon {
    font-size: 1.15em;
}

.card--airport .card__price-value {
    font-family: "Proxima Nova", sans-serif;
    font-size: 1.5rem;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.card--airport .card__price-value small {
    font-size: 0.6em;
    font-weight: 300;
}

.card--airport .card__price-meta {
    margin-top: 0.125rem;
    font-size: 0.875rem;
    font-weight: 300;
    line-height: 1.45;
}

.card--airport .card__price-daytrip {
    display: block;
}

.card--airport .card__price-note {
    font-size: 0.75rem;
    font-weight: 400;
    opacity: 0.7;
    hyphens: manual;
    text-wrap: pretty;
}


/* Price page: hero */
.route-prices-hero .section__subtitle {
    max-width: 52rem;
    line-height: 1.3;
}


/* Price page: tabs and facts */
.route-prices__tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.route-prices__tab {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: 1px solid rgba(31, 31, 31, 0.6);
    border-radius: 60px;
    background-color: rgba(255, 255, 255, 0.25);
    color: #1f1f1f;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
}

.route-prices__tab:hover {
    background-color: rgba(255, 255, 255, 0.55);
}

.route-prices__tab.active {
    border-color: #1f1f1f;
    background-color: #1f1f1f;
    color: #ffffff;
}

.route-prices__tab:focus-visible {
    outline: 2px solid #1f1f1f;
    outline-offset: 3px;
}

.route-prices__facts {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 3.5rem;
}

.route-prices__fact {
    padding: 1.5rem;
    border-radius: 12px;
    background-color: #ffffff;
}

.route-prices__fact-value {
    font-family: "Proxima Nova", sans-serif;
    font-size: 2rem;
    font-weight: 500;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
}

.route-prices__fact-label {
    margin-top: 0.5rem;
    font-weight: 300;
    line-height: 1.45;
    hyphens: manual;
}


/* Price page: tables */
.route-prices__group + .route-prices__group {
    margin-top: 4rem;
}

.route-prices__group-title {
    margin-bottom: 1rem;
    font-family: "Proxima Nova", sans-serif;
    font-size: 1.875rem;
    font-weight: 500;
    text-wrap: balance;
}

.route-prices__group-title span {
    font-weight: 300;
}

.route-prices__table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    overflow: hidden;
    border-radius: 12px;
    background-color: #ffffff;
    text-align: left;
}

.route-prices__table th,
.route-prices__table td {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #ececec;
    vertical-align: middle;
}

.route-prices__table tbody tr:last-child th,
.route-prices__table tbody tr:last-child td {
    border-bottom: 0;
}

.route-prices__table thead th {
    background-color: #faf9f7;
    color: rgba(31, 31, 31, 0.75);
    font-size: 0.875rem;
    font-weight: 600;
    vertical-align: top;
    white-space: nowrap;
}

.route-prices__price-head span {
    display: block;
    margin-top: 0.125rem;
    font-size: 0.8125rem;
    font-weight: 300;
    white-space: normal;
}

.route-prices__table tbody tr:hover {
    background-color: rgba(185, 169, 141, 0.08);
}

.route-prices__destination {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 400;
}

.route-prices__flag {
    display: block;
    flex: none;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 999px;
    background-color: #ececec; /* neutral circle while loading or without flag */
    object-fit: cover;
}

.route-prices__destination-text {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    min-width: 0;
}

.route-prices__destination-name {
    font-size: 1.125rem;
    font-weight: 600;
    color: inherit;
}

a.route-prices__destination-name {
    text-decoration: underline;
    text-decoration-color: rgba(31, 31, 31, 0.3);
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

a.route-prices__destination-name:hover {
    text-decoration-color: #1f1f1f;
}

.route-prices__destination-airport {
    font-size: 0.8125rem;
    font-weight: 300;
}

.route-prices__price {
    font-size: 1.125rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.route-prices__price small {
    margin-right: 0.125rem;
    font-size: 0.8125rem;
    font-weight: 400;
    opacity: 0.6;
}

.route-prices__cta {
    text-align: right;
}

.route-prices__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    min-width: 0;
    padding: 0.5rem 1.125rem;
    border: 1px solid #1f1f1f;
    background-color: transparent;
    color: #1f1f1f;
    white-space: nowrap;
}

.route-prices__button:hover {
    background-color: #1f1f1f;
    color: #ffffff;
}

.route-prices__note {
    display: flex;
    gap: 0.5rem;
    margin-top: 2.5rem;
    font-size: 0.875rem;
    font-weight: 300;
    line-height: 1.45;
}

/* Desktop: the same column grid in every group, numbers without line breaks, prices right aligned */
@media (min-width: 1101px) {
    .route-prices__table {
        table-layout: fixed;
    }

    .route-prices__table thead th:nth-child(1) { width: 27%; }
    .route-prices__table thead th:nth-child(2) { width: 11%; }
    .route-prices__table thead th:nth-child(3) { width: 9%; }
    .route-prices__table thead th:nth-child(n+4):nth-child(-n+6) { width: 13%; }
    .route-prices__table thead th:last-child { width: 14%; }

    .route-prices__table td {
        white-space: nowrap;
    }

    .route-prices__price,
    .route-prices__price-head {
        text-align: right;
    }
}

@media (min-width: 1101px) and (max-width: 1280px) {
    .route-prices__table th,
    .route-prices__table td {
        padding: 1rem 0.75rem;
    }

    .route-prices__button {
        padding: 0.5rem 0.875rem;
    }

    .route-prices__button .icon {
        display: none;
    }
}


/* Price page: price explanation and FAQ */
.route-prices-method__items {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    margin-top: 3rem;
}

.route-prices-method__item .icon {
    font-size: 2rem;
    color: #B9A98D;
}

.route-prices-method__item h3 {
    margin: 1rem 0 0.5rem;
    font-family: "Proxima Nova", sans-serif;
    font-size: 1.375rem;
    font-weight: 500;
}

.route-prices-method__item p {
    font-weight: 300;
    line-height: 1.5;
}

.route-prices-method__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 3rem;
}

.route-prices-faq__items {
    display: flex;
    flex-direction: column;
    max-width: 900px;
    margin-top: 3rem;
}

.route-prices-faq__item {
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.route-prices-faq__item:first-child {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.route-prices-faq__item summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.25rem 0;
    font-family: "Proxima Nova", sans-serif;
    font-size: 1.25rem;
    font-weight: 500;
    list-style: none;
    cursor: pointer;
    transition: color 0.2s;
}

.route-prices-faq__item summary:hover {
    color: #B9A98D;
}

.route-prices-faq__item summary:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: 3px;
}

.route-prices-faq__item summary::-webkit-details-marker {
    display: none;
}

.route-prices-faq__item summary .icon {
    flex: none;
    font-size: 1.5rem;
    color: #B9A98D;
    transition: transform 0.2s;
}

.route-prices-faq__item[open] summary .icon {
    transform: rotate(180deg);
}

.route-prices-faq__item p {
    max-width: 68ch;
    padding-bottom: 1.5rem;
    font-weight: 300;
    line-height: 1.6;
}


/* Tablet and phone (up to 1100px): one card per destination, flight time and distance as meta row, prices as rows */
@media (max-width: 1100px) {
    .route-prices__facts,
    .route-prices-method__items {
        grid-template-columns: repeat(2, 1fr);
    }

    .route-prices__table,
    .route-prices__table tbody,
    .route-prices__table tr,
    .route-prices__table th,
    .route-prices__table td {
        display: block;
    }

    .route-prices__table {
        overflow: visible;
        background-color: transparent;
    }

    .route-prices__table thead {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
    }

    .route-prices__table tbody tr {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        column-gap: 1rem;
        margin-bottom: 0.75rem;
        padding: 1.25rem;
        border-radius: 12px;
        background-color: #ffffff;
    }

    .route-prices__table tbody th,
    .route-prices__table tbody td {
        min-width: 0;
        padding: 0.375rem 0;
        border-bottom: 0;
        overflow-wrap: anywhere;
    }

    .route-prices__table tbody th {
        grid-column: 1 / -1;
        margin-bottom: 0.5rem;
    }

    .route-prices__table tbody td::before {
        content: attr(data-label);
        display: block;
        margin-bottom: 0.125rem;
        font-size: 0.8125rem;
        font-weight: 300;
        opacity: 0.7;
    }

    .route-prices__table tbody .route-prices__price {
        grid-column: 1 / -1;
        display: flex;
        align-items: baseline;
        gap: 0.375rem;
        padding: 0.625rem 0;
        border-top: 1px solid #ececec;
        font-size: 1.0625rem;
        overflow-wrap: normal;
    }

    .route-prices__table tbody .route-prices__price::before {
        display: inline;
        margin: 0 auto 0 0; /* label left, price right */
        font-size: 0.875rem;
        opacity: 1;
    }

    .route-prices__table tbody .route-prices__price + .route-prices__cta {
        border-top: 1px solid #ececec;
    }

    .route-prices__table tbody .route-prices__cta {
        grid-column: 1 / -1;
        margin-top: 0;
        padding-top: 0.875rem;
        text-align: left;
    }

    .route-prices__button {
        width: 100%;
        padding: 0.625rem 1rem;
    }
}

@media (min-width: 641px) and (max-width: 1100px) {
    .route-prices__table tbody {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.75rem;
    }

    .route-prices__table tbody tr {
        margin-bottom: 0;
    }
}

@media (max-width: 640px) {
    .route-prices__facts {
        gap: 0.5rem;
        margin-bottom: 2.5rem;
    }

    .route-prices__fact {
        padding: 1rem;
    }

    .route-prices__fact-value {
        font-size: 1.5rem;
    }

    .route-prices__fact-label {
        font-size: 0.875rem;
        line-height: 1.35;
    }

    .route-prices__group + .route-prices__group {
        margin-top: 2.5rem;
    }

    .route-prices__group-title {
        font-size: 1.5rem;
    }

    .route-prices-method__items {
        grid-template-columns: 1fr;
    }

    .route-prices-method__actions .button {
        justify-content: center;
        width: 100%;
    }
}
