body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f9f9f9;
}

.search-container {
    display: flex;
    justify-content: center;
    padding: 20px;
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.search-form {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    max-width: 1000px;
    width: 100%;
}

@media (max-width: 768px) {
    .search-form .input-group {
        width: 100%;
        display: flex;
        flex-direction: column;
    }
}

.form-title {
    font-size: 23px;
    font-weight: bold;
    color: #333;
    text-align: center;
    width: 100%;
    margin-bottom: 20px;
}

.flight-type {
    display: flex;
    gap: 10px;
    align-items: flex-end;
}

.flight-type button {
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 8px 16px;
    cursor: pointer;
    font-size: 14px;
    color: #333;
}

.flight-type button.active {
    background-color: #e0e0e0;
    border-color: #ccc;
}

.input-group {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.input-group label {
    font-size: 12px;
    color: #666;
    margin-bottom: 5px;
}

.input-group input,
.input-group select {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    background-color: #fff;
    color: #333;
}

.passengers-class {
    display: flex;
    gap: 10px;
    flex: 1;
}

.search-button {
    background-color: #555;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 10px 20px;
    cursor: pointer;
    font-size: 16px;
    align-self: flex-end;
    flex: 1;
}

.search-button:hover {
    background-color: #444;
}

.second-row {
    display: flex;
    gap: 10px;
    width: 100%;
}

.quantity-control {
    display: flex;
    align-items: center;
    gap: 5px;
}

.quantity-control button {
    width: 30px !important;
    height: 30px !important;
    background-color: #f0f0f0 !important;
    border: 1px solid #ddd !important;
    border-radius: 4px !important;
    font-size: 14px !important;
    color: #333 !important;
    cursor: pointer !important;
}

.quantity-control button:hover {
    background-color: #e0e0e0;
}

.quantity-control input {
    width: 40px !important;
    height: 30px !important;
    text-align: center !important;
    font-size: 16px !important;
    padding: 5px !important;
    border: 1px solid #ddd !important;
    border-radius: 4px !important;
    background-color: #fff !important;
}

/* Remove estilos conflitantes do WordPress */
input[type="number"] {
    -moz-appearance: textfield !important;
}

input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none !important;
    margin: 0 !important;
}

/* Aplica a correção apenas no WordPress */
select {
    width: auto !important;
    min-width: max-content !important;
    display: block !important;
    padding: 8px !important;
    font-size: 14px !important;
    border: 1px solid #ddd !important;
    border-radius: 4px !important;
    background-color: #fff !important;
    color: #333 !important;
    cursor: pointer !important;
    appearance: none; /* Remove a aparência padrão do sistema */
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    padding-right: 30px !important; /* Espaço para a seta */
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 4 5'%3E%3Cpath fill='%23999999' d='M2 5L0 0h4z'/%3E%3C/svg%3E");
    background-repeat: no-repeat !important;
    background-position: right 10px center !important;
    background-size: 12px !important;
}

.loading-messages {
    margin-top: 20px;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: none; /* Escondido por padrão */
}

.loading-messages.active {
    display: block; /* Exibido quando ativo */
}

.loading-messages p {
    font-size: 14px;
    color: #333;
    margin: 0;
    text-align: center;
}

@media (max-width: 768px) {
    .second-row {
        flex-direction: column;
    }

    .passengers-class {
        flex-direction: column;
    }

    .mobile-break {
        flex-basis: 100%;
    }
}

/* Estilos para a lista de resultados de voos */
.flight-results {
    margin-top: 30px;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.flight-results h2 {
    font-size: 20px;
    margin-bottom: 20px;
    color: #333;
}

.flight-group {
    margin-bottom: 30px;
}

.flight-header {
    background-color: #000;
    color: white;
    padding: 12px 20px;
    border-radius: 8px 8px 0 0;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: bold;
}

.flight-header .route {
    font-weight: 500;
    font-size: 14px;
    font-weight: bold;
}

.flight-header .trip-type {
    font-size: 14px;
    opacity: 0.9;
}

.flight-header .date {
    font-size: 14px;
    opacity: 0.9;
}

.flight-option {
    margin-bottom: 10px;
}

.flight-radio {
    display: none;
}

.flight-card {
    background: white;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 40px;
    transition: box-shadow 0.3s;
}

.flight-radio:checked + .flight-card {
    box-shadow: 0 0 0 2px #ff5722;
}

.airline-info {
    width: 100px;
}

.airline {
    font-weight: bold;
    color: #ff5722;
    font-size: 16px;
}

.flight-number {
    color: #666;
    font-size: 12px;
}

.departure, .arrival {
    text-align: center;
    width: 150px;
}

.label {
    color: #666;
    font-size: 12px;
    margin-bottom: 5px;
}

.time {
    font-size: 24px;
    font-weight: bold;
}

.day-offset {
    color: #ff5722;
    font-size: 14px;
    font-weight: normal;
}

.flight-details {
    text-align: center;
    width: 120px;
}

.duration {
    color: #28a745;
    font-weight: bold;
    margin-bottom: 5px;
}

.stops {
    color: #666;
    font-size: 12px;
    margin-bottom: 5px;
}

.more-details {
    background: none;
    border: none;
    color: #666;
    text-decoration: underline;
    cursor: pointer;
    font-size: 12px;
}

.price-info {
    margin-left: auto;
    text-align: right;
    width: 200px;
}

.price {
    font-size: 20px;
    font-weight: bold;
    color: #ff5722;
    margin-bottom: 10px;
}

.price-details {
    display: none;
    font-size: 12px;
    color: #666;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2px;
}

.flight-radio:checked + .flight-card .price-details {
    display: block;
}

.flight-card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

@media (max-width: 768px) {
    .flight-card {
        flex-wrap: wrap; /* Permite que os elementos quebrem de linha */
        gap: 10px;
        justify-content: center;
        align-items: center;
        text-align: center;
    }

    .flight-info {
        display: flex;
        flex-wrap: wrap;
        width: 100%;
        justify-content: center;
        gap: 10px;
    }

    .airline-info, .departure, .flight-details {
        flex: 1 1 auto; /* Mantém os três primeiros itens lado a lado */
        min-width: 100px;
    }

    .arrival, .price-info {
        flex: 1 1 50%; /* Faz as duas últimas colunas ocuparem a linha de baixo */
        text-align: center;
    }

    .price-info {
        font-size: 18px;
    }
}

@media (max-width: 768px) {
    .flight-header {
        display: flex;
        flex-wrap: wrap;
        justify-content: space-between;
        align-items: center;
        text-align: center;
        padding: 10px; /* Ajusta o padding para economizar espaço */
        font-size: 12px; /* Reduz um pouco o tamanho da fonte */
        gap: 5px;
    }

    .flight-header .route, 
    .flight-header .trip-type, 
    .flight-header .date {
        flex: 1 1 auto;
        white-space: nowrap; /* Evita quebra de linha */
        text-align: center;
    }
}

.no-flights-message {
    background: #fff;
    border: 1px solid #ddd;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    margin-top: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.no-flights-message h3 {
    color: #ff5722;
    font-size: 18px;
    margin-bottom: 10px;
}

.no-flights-message p {
    color: #333;
    font-size: 14px;
    margin-bottom: 15px;
}

/* Centraliza o texto das células e mantém os cabeçalhos em negrito */
.modal-body table th {
    text-align: center;
    font-weight: bold; /* Cabeçalhos em negrito */
    background-color: #f8f8f8;
    padding: 10px;
}

/* Centraliza o texto das células normais e remove negrito */
.modal-body table td {
    text-align: center;
    font-weight: normal;
    padding: 8px;
}

/* Ajusta a tabela para ocupar toda a largura disponível */
.modal-body table {
    width: 100%;
    border-collapse: collapse;
}

/* Adiciona bordas sutis */
.modal-body table, .modal-body table th, .modal-body table td {
    border: 1px solid #ddd;
}

/* Aplica o efeito zebrado nas linhas da tabela */
.modal-body table tbody tr:nth-child(odd) {
    background-color: #f2f2f2; /* Linhas ímpares com cor de fundo */
}

.select-flight-btn {
    background-color: #ff5722;  /* Cor de destaque (laranja vibrante) */
    color: white;
    font-size: 16px;
    font-weight: bold;
    padding: 12px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s ease-in-out;
    width: 100%;  /* Faz o botão ocupar toda a largura disponível */
    text-align: center;
    display: block; /* Para garantir alinhamento correto */
}

.select-flight-btn:hover {
    background-color: #e64a19;  /* Um tom mais escuro ao passar o mouse */
}

.selected-flight {
    border: 2px solid #ff5722 !important;
    box-shadow: 0 0 10px rgba(255, 87, 34, 0.5) !important;
    transition: box-shadow 0.3s ease-in-out;
}

.flight-summary-container {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-top: 30px;
    display: none;
}

.flight-summary-container h2 {
    font-size: 20px;
    margin-bottom: 15px;
    color: #333;
}

.flight-summary {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    font-size: 16px;
    margin-bottom: 10px;
}

.summary-total {
    display: flex;
    justify-content: space-between;
    font-size: 20px;
    font-weight: bold;
    color: #ff5722;
}

.flight-summary-container h3 {
    font-size: 18px;
    margin-bottom: 10px;
    color: #333;
}

.flight-summary-container p {
    font-size: 14px;
    color: #666;
    margin-bottom: 20px;
}

/* ✅ Alinhamento do formulário em uma única linha no desktop */
.form-row {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* Cada campo ocupa igualmente o espaço disponível */
.form-group {
    flex: 1;
}

/* Estilização dos campos de input */
.form-group label {
    display: block;
    font-size: 14px;
    color: #333;
    margin-bottom: 5px;
}

.form-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

/* O botão ocupará espaço adequado na linha */
.confirm-btn {
    background-color: #ff5722;
    color: white;
    font-size: 16px;
    font-weight: bold;
    padding: 12px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s ease-in-out;
    margin-top: 20px;
    min-width: 150px; /* Define um tamanho mínimo */
}

/* Efeito ao passar o mouse */
.confirm-btn:hover {
    background-color: #e64a19;
}

/* ✅ No mobile, os itens ficam empilhados um abaixo do outro */
@media (max-width: 768px) {
    .form-row {
        flex-direction: column;
    }

    .confirm-btn {
        width: 100%; /* O botão ocupa a largura total no mobile */
    }
}

#loadingOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7); /* Fundo escuro semi-transparente */
    display: none; /* Escondido por padrão */
    justify-content: center;
    align-items: center;
    z-index: 9999; /* Sobrepõe tudo */
}

.loading-content {
    background: white;
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.2);
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(0, 0, 0, 0.2);
    border-top: 5px solid #ff5722;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

p {
    font-size: 16px;
    color: #333;
}

@media (max-width: 768px) {
    .search-form {
        display: flex;
        flex-direction: column;
    }

    .flight-type {
        width: 100%;
        display: flex;
        justify-content: space-between;
    }

    .input-group {
        width: 100% !important;
        display: flex;
        flex-direction: column;
    }

    .input-group input {
        width: 100%;
    }
    
    /* Garante que o campo "Origem" fique abaixo do botão "Só Ida" */
    .input-group:first-of-type {
        clear: both;
    }
}

.modal {
    display: none !important;
    opacity: 0;
    visibility: hidden;
}

.modal.show {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
}

