/* ============================================================
   AÉREO - FORMULÁRIO DE PESQUISA
   Mantém o mesmo padrão compacto do Hotel
   ============================================================ */

#search-panel-aereo .search-fields {
    display: grid;

    grid-template-columns:
        minmax(180px, 1.45fr) 44px minmax(180px, 1.45fr) minmax(135px, 0.85fr) minmax(135px, 0.85fr) minmax(145px, 0.9fr);

    gap: 12px;

    align-items: end;

    width: 100%;
}


/* ============================================================
   CAMPOS
   ============================================================ */

#search-panel-aereo .form-group {
    min-width: 0;
    width: 100%;
}

#search-panel-aereo .form-group label {
    display: block;

    margin-bottom: 7px;

    color: var(--text-muted);

    font-size: 12px;
    font-weight: 700;
}


/* ============================================================
   INPUT WRAPPER
   ============================================================ */

#search-panel-aereo .input-wrapper {
    position: relative;

    display: flex;
    align-items: center;

    width: 100%;
}

#search-panel-aereo .input-wrapper>i {
    position: absolute;

    left: 14px;

    z-index: 2;

    color: #93a4b8;

    font-size: 14px;

    pointer-events: none;
}


/* ============================================================
   INPUTS / SELECTS
   ============================================================ */

#search-panel-aereo .input-wrapper input,
#search-panel-aereo .input-wrapper select {
    width: 100%;
    height: 50px;

    padding: 0 14px 0 42px;

    border: 1px solid #d7e1eb;
    border-radius: 10px;

    background: #f8fafc;

    color: var(--text);

    font: inherit;
    font-size: 14px;

    outline: none;

    transition:
        border-color 0.2s ease,
        background 0.2s ease,
        box-shadow 0.2s ease;
}

#search-panel-aereo .input-wrapper input:hover,
#search-panel-aereo .input-wrapper select:hover {
    border-color: #c4d2df;
}

#search-panel-aereo .input-wrapper input:focus,
#search-panel-aereo .input-wrapper select:focus {
    border-color: var(--accent);

    background: #ffffff;

    box-shadow:
        0 0 0 3px rgba(22, 131, 229, 0.10);
}


/* ============================================================
   SWAP
   ============================================================ */

#search-panel-aereo .swap-container {
    display: flex;
    align-items: flex-end;
    justify-content: center;

    height: 100%;
}

#search-panel-aereo .btn-swap {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 40px;
    height: 40px;

    margin-bottom: 5px;

    padding: 0;

    border: 1px solid #bcdcff;
    border-radius: 50%;

    background: #eef7ff;

    color: var(--accent);

    cursor: pointer;

    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease;
}

#search-panel-aereo .btn-swap:hover {
    background: #dfefff;

    border-color: var(--accent);

    transform: rotate(180deg);
}


/* ============================================================
   RESPONSIVO
   ============================================================ */

@media (max-width: 1100px) {

    #search-panel-aereo .search-fields {
        grid-template-columns:
            minmax(180px, 1fr) 44px minmax(180px, 1fr) repeat(2, minmax(140px, 0.8fr));

        row-gap: 16px;
    }

    #search-panel-aereo .form-group:last-child {
        grid-column: span 2;
    }
}


@media (max-width: 800px) {

    #search-panel-aereo .search-fields {
        grid-template-columns:
            1fr 44px 1fr;
    }

    #search-panel-aereo .form-group:last-child {
        grid-column: auto;
    }
}


@media (max-width: 600px) {

    #search-panel-aereo .search-fields {
        display: flex;
        flex-direction: column;

        gap: 14px;
    }

    #search-panel-aereo .form-group {
        width: 100%;
    }

    #search-panel-aereo .swap-container {
        width: 100%;
        height: auto;
    }

    #search-panel-aereo .btn-swap {
        margin: -3px 0;

        transform: rotate(90deg);
    }

    #search-panel-aereo .btn-swap:hover {
        transform: rotate(270deg);
    }
}

/* ============================================================
   AÉREO - RESULTADOS
   ============================================================ */

#aereo-results {
    width: 100%;
}

#aereo-results .results-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 22px;
}

#aereo-results .results-eyebrow {
    display: block;
    margin-bottom: 4px;

    color: var(--accent);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

#aereo-results .results-header h2 {
    margin: 0;

    color: var(--primary);
    font-size: 24px;
    line-height: 1.2;
}

#aereo-results .results-header p {
    margin: 5px 0 0;

    color: var(--text-muted);
    font-size: 13px;
}


/* ============================================================
   ORDENAÇÃO
   ============================================================ */

#aereo-results .results-sort {
    display: flex;
    flex-direction: column;
    gap: 6px;

    min-width: 190px;
}

#aereo-results .results-sort label {
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 700;
}

#aereo-results .results-sort select {
    width: 100%;
    height: 42px;

    padding: 0 36px 0 13px;

    border: 1px solid #d7e1eb;
    border-radius: 9px;

    background: #fff;
    color: var(--text);

    font: inherit;
    font-size: 13px;

    outline: none;
    cursor: pointer;
}

#aereo-results .results-sort select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(22, 131, 229, 0.10);
}


/* ============================================================
   LISTA
   ============================================================ */

.flight-results-list {
    display: flex;
    flex-direction: column;
    gap: 14px;

    width: 100%;
}


/* ============================================================
   CARD
   ============================================================ */

.flight-card {
    width: 100%;

    overflow: hidden;

    border: 1px solid #e0e7ef;
    border-radius: 15px;

    background: #ffffff;

    box-shadow:
        0 4px 12px rgba(5, 35, 61, 0.035),
        0 12px 30px rgba(5, 35, 61, 0.025);

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        transform 0.2s ease;
}

.flight-card:hover {
    transform: translateY(-2px);

    border-color: #bddcf7;

    box-shadow:
        0 6px 16px rgba(5, 35, 61, 0.06),
        0 18px 36px rgba(5, 35, 61, 0.05);
}


/* ============================================================
   CORPO
   ============================================================ */

.flight-main {
    display: grid;

    grid-template-columns:
        180px minmax(360px, 1fr) 205px;

    gap: 28px;

    align-items: center;

    min-height: 132px;

    padding: 22px 24px;
}


/* ============================================================
   COMPANHIA
   ============================================================ */

.flight-airline {
    display: flex;
    align-items: center;
    gap: 13px;

    min-width: 0;
}

.airline-logo {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 48px;
    height: 48px;

    flex: 0 0 48px;

    border: 1px solid #d9eafb;
    border-radius: 13px;

    background: #edf7ff;

    color: var(--accent);

    font-size: 13px;
    font-weight: 900;
}

.flight-airline>div:last-child {
    display: flex;
    flex-direction: column;
    gap: 3px;

    min-width: 0;
}

.flight-airline strong {
    color: var(--primary);

    font-size: 15px;
    font-weight: 800;
}

.flight-airline span {
    color: var(--text-muted);

    font-size: 12px;
}


/* ============================================================
   TRAJETO
   ============================================================ */

.flight-route {
    display: grid;

    grid-template-columns:
        72px minmax(150px, 1fr) 72px;

    gap: 18px;

    align-items: center;

    width: 100%;
}

.flight-time {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.flight-time:last-child {
    text-align: right;
}

.flight-time strong {
    color: var(--primary);

    font-size: 24px;
    font-weight: 800;
    line-height: 1;
}

.flight-time span {
    color: #526579;

    font-size: 13px;
    font-weight: 700;
}


/* ============================================================
   DURAÇÃO
   ============================================================ */

.flight-duration {
    width: 100%;
    text-align: center;
}

.flight-duration>span {
    display: block;

    margin-bottom: 7px;

    color: #77889a;

    font-size: 11px;
    font-weight: 600;
}

.flight-duration small {
    display: inline-block;

    margin-top: 7px;
    padding: 3px 9px;

    border-radius: 999px;

    background: #f2f6fa;

    color: #596c80;

    font-size: 10px;
    font-weight: 700;
}

.flight-line {
    position: relative;

    display: flex;
    align-items: center;

    width: 100%;
    height: 18px;
}

.flight-line>span {
    width: 100%;
    height: 2px;

    border-radius: 999px;

    background: #dce5ee;
}

.flight-line::before,
.flight-line::after {
    content: "";

    position: absolute;
    top: 50%;

    z-index: 2;

    width: 7px;
    height: 7px;

    transform: translateY(-50%);

    border: 2px solid var(--accent);
    border-radius: 50%;

    background: #ffffff;
}

.flight-line::before {
    left: 0;
}

.flight-line::after {
    right: 0;
}

.flight-line i {
    position: absolute;
    top: 50%;
    left: 50%;

    z-index: 3;

    transform: translate(-50%, -50%);

    padding: 0 9px;

    background: #ffffff;

    color: var(--accent);

    font-size: 14px;
}


/* ============================================================
   PREÇO
   ============================================================ */

.flight-price {
    display: flex;
    flex-direction: column;
    align-items: flex-end;

    padding-left: 22px;

    border-left: 1px solid #edf1f5;

    text-align: right;
}

.flight-price .price-label {
    color: #8492a1;

    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.flight-price strong {
    margin-top: 3px;

    color: var(--primary);

    font-size: 25px;
    font-weight: 800;
    line-height: 1.15;
}

.flight-price small {
    margin-top: 4px;

    color: #7b8998;

    font-size: 10px;
}


/* ============================================================
   BOTÃO
   ============================================================ */

.flight-select-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 100%;
    height: 42px;

    margin-top: 13px;
    padding: 0 18px;

    border: 0;
    border-radius: 9px;

    background: var(--accent);

    color: #ffffff;

    font: inherit;
    font-size: 13px;
    font-weight: 700;

    cursor: pointer;

    box-shadow: 0 6px 16px rgba(22, 131, 229, 0.16);

    transition:
        background 0.2s ease,
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.flight-select-button:hover {
    transform: translateY(-1px);

    background: var(--accent-hover);

    box-shadow: 0 8px 20px rgba(22, 131, 229, 0.22);
}


/* ============================================================
   INFORMAÇÕES INFERIORES
   ============================================================ */

.flight-footer {
    display: flex;
    align-items: center;
    flex-wrap: wrap;

    gap: 10px 24px;

    min-height: 44px;

    padding: 9px 24px;

    border-top: 1px solid #edf1f5;

    background: #fbfcfe;
}

.flight-footer span {
    display: inline-flex;
    align-items: center;
    gap: 7px;

    color: #647487;

    font-size: 11px;
    font-weight: 500;
}

.flight-footer i {
    color: var(--accent);
}


/* ============================================================
   LOADING
   ============================================================ */

#aereo-loading {
    align-items: center;
    gap: 15px;

    margin-bottom: 18px;
    padding: 20px;

    border: 1px solid #e0e7ef;
    border-radius: 13px;

    background: #ffffff;
}

#aereo-loading:not([hidden]) {
    display: flex;
}

.loading-spinner {
    width: 27px;
    height: 27px;

    flex: 0 0 27px;

    border: 3px solid #e4edf5;
    border-top-color: var(--accent);
    border-radius: 50%;

    animation: flight-spinner 0.7s linear infinite;
}

@keyframes flight-spinner {
    to {
        transform: rotate(360deg);
    }
}


/* ============================================================
   SEM RESULTADOS
   ============================================================ */

#aereo-empty-results {
    padding: 46px 24px;

    border: 1px dashed #ccd8e5;
    border-radius: 15px;

    background: #ffffff;

    text-align: center;
}

#aereo-empty-results i {
    margin-bottom: 12px;

    color: #9aaabc;

    font-size: 32px;
}

#aereo-empty-results h3 {
    margin: 0 0 6px;

    color: var(--primary);
}

#aereo-empty-results p {
    margin: 0;

    color: var(--text-muted);
}


/* ============================================================
   RESPONSIVO DOS RESULTADOS
   ============================================================ */

@media (max-width: 950px) {

    .flight-main {
        grid-template-columns:
            150px minmax(260px, 1fr) 175px;

        gap: 18px;
    }
}


@media (max-width: 800px) {

    .flight-main {
        grid-template-columns: 1fr;

        gap: 18px;
    }

    .flight-airline {
        padding-bottom: 15px;

        border-bottom: 1px solid #edf1f5;
    }

    .flight-price {
        align-items: flex-start;

        padding-top: 16px;
        padding-left: 0;

        border-top: 1px solid #edf1f5;
        border-left: 0;

        text-align: left;
    }

    .flight-select-button {
        width: auto;
        min-width: 180px;
    }
}


@media (max-width: 600px) {

    #aereo-results .results-header {
        align-items: stretch;
        flex-direction: column;
    }

    #aereo-results .results-sort {
        width: 100%;
    }

    .flight-main {
        padding: 18px;
    }

    .flight-route {
        grid-template-columns:
            55px minmax(90px, 1fr) 55px;

        gap: 8px;
    }

    .flight-time strong {
        font-size: 20px;
    }

    .flight-footer {
        align-items: flex-start;
        flex-direction: column;

        padding: 12px 18px;
    }

    .flight-select-button {
        width: 100%;
    }
}