/* ==========================================
   POSTO CERTO - ESTILO PRINCIPAL
   ========================================== */

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background-color: #f4f6f8;
    color: #222;
}

/* ==========================================
   CABEÇALHO
   ========================================== */

header {
    background-color: #1f7a3f;
    color: white;
    padding: 25px 15px;
    text-align: center;
}

header h1 {
    margin: 0 0 8px;
    font-size: 34px;
}

header p {
    margin: 0;
    font-size: 16px;
}

/* ==========================================
   ÁREA PRINCIPAL
   ========================================== */

main {
    width: 92%;
    max-width: 1000px;
    margin: 25px auto;
}

/* ==========================================
   SEÇÕES
   ========================================== */

section {
    background-color: white;
    padding: 22px;
    margin-bottom: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

section h2 {
    margin-top: 0;
    margin-bottom: 18px;
    color: #1f7a3f;
}

/* ==========================================
   CAMPOS
   ========================================== */

input,
select {
    width: 100%;
    box-sizing: border-box;
    padding: 13px;
    margin-bottom: 12px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 16px;
    background-color: white;
}

input:focus,
select:focus {
    outline: none;
    border-color: #1f7a3f;
    box-shadow: 0 0 0 2px rgba(31, 122, 63, 0.12);
}

/* ==========================================
   BOTÕES
   ========================================== */

button {
    width: 100%;
    padding: 13px;
    border: none;
    border-radius: 8px;
    background-color: #1f7a3f;
    color: white;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s;
}

button:hover {
    background-color: #17632f;
}

button:disabled {
    background-color: #999;
    cursor: not-allowed;
}

/* ==========================================
   ÁREA DE BUSCA
   ========================================== */

#busca-consumidor {
    border-top: 5px solid #1f7a3f;
}

#busca-consumidor h2 {
    font-size: 24px;
    margin-bottom: 20px;
}

/* ==========================================
   LOCALIZAÇÃO
   ========================================== */

#localizacao-usuario {
    margin: 0 0 15px;
    padding: 10px 12px;
    background-color: #f1f7f3;
    border-radius: 8px;
    border-left: 4px solid #1f7a3f;
    color: #555;
    font-size: 14px;
}

/* ==========================================
   RESULTADOS
   ========================================== */

#lista-resultados {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

#lista-postos {
    padding: 5px 0;
}

/* ==========================================
   CARD DOS MELHORES POSTOS
   ========================================== */

.card-resultado,
.card-posto {
    background-color: #f9faf9;
    padding: 18px;
    margin-bottom: 15px;
    border-radius: 10px;
    border: 1px solid #e0e0e0;
    border-left: 5px solid #1f7a3f;
}

.card-resultado:hover,
.card-posto:hover {
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
}

/* ==========================================
   TÍTULO DO POSTO
   ========================================== */

.card-resultado h3,
.card-posto h3 {
    margin: 0 0 10px;
    color: #1f7a3f;
    font-size: 20px;
}

/* ==========================================
   INFORMAÇÕES DOS CARDS
   ========================================== */

.card-resultado p,
.card-posto p {
    margin: 6px 0;
    color: #555;
    line-height: 1.4;
}

.card-resultado strong,
.card-posto strong {
    color: #222;
}

/* ==========================================
   DESTAQUE DA ECONOMIA
   ========================================== */

.economia {
    margin-top: 12px;
    padding: 12px;
    background-color: #eaf6ed;
    border-radius: 8px;
    color: #17632f;
    font-weight: bold;
}

/* ==========================================
   PREÇO
   ========================================== */

.preco-destaque {
    font-size: 24px;
    font-weight: bold;
    color: #1f7a3f;
    margin: 10px 0;
}

/* ==========================================
   BOTÃO DE ROTA
   ========================================== */

.botao-rota {
    margin-top: 12px;
    background-color: #2563eb;
}

.botao-rota:hover {
    background-color: #1d4ed8;
}

/* ==========================================
   MAPA
   ========================================== */

#mapa {
    width: 100%;
    height: 500px;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #e0e0e0;
}

.leaflet-container {
    font-family: Arial, sans-serif;
}

/* ==========================================
   MENSAGENS
   ========================================== */

#mensagem-usuario {
    margin-top: 12px;
    font-size: 14px;
    color: #555;
}

.mensagem-erro {
    color: #b42318;
    background-color: #fef3f2;
    padding: 10px;
    border-radius: 8px;
}

.mensagem-sucesso {
    color: #17632f;
    background-color: #eaf6ed;
    padding: 10px;
    border-radius: 8px;
}

/* ==========================================
   LOGIN
   ========================================== */

#login {
    border-top: 5px solid #1f7a3f;
}

#login h2 {
    margin-bottom: 18px;
}

/* ==========================================
   CADASTRO DE VEÍCULO
   ========================================== */

#cadastro-veiculo {
    border-top: 4px solid #1f7a3f;
}

/* ==========================================
   CADASTRO DE POSTO
   ========================================== */

#cadastro-posto {
    border-top: 4px solid #1f7a3f;
}

/* ==========================================
   RODAPÉ
   ========================================== */

footer {
    text-align: center;
    padding: 20px;
    color: #666;
}

/* ==========================================
   RESPONSIVIDADE
   CELULAR
   ========================================== */

@media (max-width: 600px) {

    header {
        padding: 20px 12px;
    }

    header h1 {
        font-size: 28px;
    }

    header p {
        font-size: 14px;
    }

    main {
        width: 94%;
        margin: 15px auto;
    }

    section {
        padding: 16px;
        border-radius: 10px;
    }

    section h2 {
        font-size: 20px;
    }

    #mapa {
        height: 400px;
    }

    .card-resultado,
    .card-posto {
        padding: 15px;
    }

    .card-resultado h3,
    .card-posto h3 {
        font-size: 18px;
    }

    .preco-destaque {
        font-size: 22px;
    }
}
/* ==========================================
   POSTO CERTO - ORGANIZACAO DOS RESULTADOS
   ========================================== */

#lista-postos {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    align-items: stretch;
    width: 100%;
    box-sizing: border-box;
}

.card-posto {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    padding: 16px !important;
    border: 1px solid #d8e2dc !important;
    border-radius: 12px !important;
    background: #ffffff !important;
    box-shadow: 0 2px 7px rgba(0, 0, 0, 0.06) !important;
    overflow-wrap: normal;
    word-break: normal;
    hyphens: auto;
}

.card-posto:first-child {
    border: 2px solid #16803d !important;
    background: #f5fff7 !important;
}

.card-posto h3 {
    margin: 0 0 10px !important;
    color: #185c35 !important;
    font-size: 16px !important;
    font-weight: 600;
    line-height: 1.45;
    overflow-wrap: normal;
    word-break: normal;
    hyphens: auto;
}

.card-posto p {
    margin: 6px 0 !important;
    font-size: 13px;
    line-height: 1.5;
    overflow-wrap: normal;
    word-break: normal;
}

.card-posto button:not([aria-label]) {
    box-sizing: border-box;
    max-width: 100%;
    min-width: 0;
    min-height: 42px;
    white-space: normal;
    overflow-wrap: normal;
    word-break: normal;
    line-height: 1.4;
}

.card-posto h4 {
    font-size: 15px;
    line-height: 1.4;
    margin: 10px 0;
}

@media (max-width: 1100px) {
    #lista-postos {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    #lista-postos {
        grid-template-columns: minmax(0, 1fr);
        gap: 12px;
    }

    .card-posto {
        padding: 13px !important;
    }

    .card-posto h3 {
        font-size: 16px !important;
    }

    .card-posto p {
        font-size: 13px;
    }

    .card-posto button:not([aria-label]) {
        min-height: 44px;
    }
}

/* Fim da organizacao dos resultados */


/* ==========================================
   ESCOLHA ENTRE MOTORISTA E POSTO
   ========================================== */

#opcoes-acesso {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.opcao-acesso {
    padding: 20px;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    background: #f9faf9;
}

.opcao-acesso h3 {
    margin-top: 0;
    color: #1f7a3f;
    text-align: center;
}

.opcao-acesso p {
    min-height: 40px;
    text-align: center;
}

.opcao-acesso .botao-secundario {
    margin-top: 10px;
    background: #ffffff;
    color: #1f7a3f;
    border: 1px solid #1f7a3f;
}

.opcao-acesso .botao-secundario:hover {
    background: #edf6ef;
}

@media (max-width: 600px) {
    #opcoes-acesso {
        grid-template-columns: 1fr;
    }
}

