/* ── ANUNCIAR.CSS — Estilos específicos da página de cadastro e reanúncio de caronas ── */

body {
    background-color: #ffbd59;
    margin: 0;
    padding: 0;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    background-color: #0f0741;
    color: white;
    padding: 8px 24px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.95rem;
    transition: opacity 0.2s ease;
    margin-bottom: 24px;
}

.back-btn:hover {
    opacity: 0.9;
}

.header-top {
    display: flex;
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
}

.header-top h1 {
    font-family: 'League Spartan', sans-serif;
    color: white;
    margin: 0;
    font-size: 2rem;
    font-weight: 800;
    text-transform: uppercase;
}

/* ── ESTILO DO FORMULÁRIO ── */
.form-container {
    padding: 32px;
    width: 100%;
    box-sizing: border-box;
}

.field {
    margin-bottom: 16px;
}

.field label {
    color: #0f0741;
    font-size: 0.85rem;
    font-weight: 800;
    margin-left: 12px;
    margin-bottom: 6px;
    display: block;
}

.field input,
.field select {
    border: 2px solid #0f0741;
    border-radius: 24px;
    padding: 12px 18px;
    background-color: #fff;
    outline: none;
    width: 100%;
    box-sizing: border-box;
    font-family: 'Nunito', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    color: #0f0741;
    transition: box-shadow 0.15s;
}

.field input:focus,
.field select:focus {
    box-shadow: 3px 3px 0 #ffbd59;
}

/* ── BOTÕES DE SENTIDO ── */
.sentido-group {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.sentido-group label {
    flex: 1;
    text-align: center;
    padding: 12px;
    border: 2px solid #0f0741;
    border-radius: 24px;
    background-color: #fff;
    font-size: 0.9rem;
    font-weight: 800;
    color: #0f0741;
    cursor: pointer;
    transition: all 0.2s;
    margin: 0 !important;
}

.sentido-group input[type="radio"]:checked+label {
    background: #0f0741;
    color: #ffbd59;
    box-shadow: 3px 3px 0 #fff;
}

/* ── FOOTER DO FORMULÁRIO ── */
.modal-footer-custom {
    display: flex;
    justify-content: flex-end;
    gap: 16px;
    padding-top: 24px;
    border-top: 2px solid rgba(15, 7, 65, 0.1);
    margin-top: 24px;
}

.btn-cancelar {
    background-color: transparent;
    color: #0f0741;
    border: 2px solid #0f0741;
    padding: 12px 24px;
    border-radius: 24px;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.2s;
    font-size: 0.95rem;
}

.btn-cancelar:hover {
    background-color: rgba(15, 7, 65, 0.05);
}

.btn-anunciar {
    background-color: #0f0741;
    color: #ffbd59;
    border: 2px solid #0f0741;
    padding: 12px 32px;
    border-radius: 24px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 3px 3px 0 #fff;
    transition: transform 0.15s, box-shadow 0.15s;
    font-family: 'Nunito', sans-serif;
    font-size: 1rem;
}

.btn-anunciar:hover {
    transform: translate(-2px, -2px);
    box-shadow: 5px 5px 0 #fff;
}

.btn-anunciar:active {
    transform: translate(2px, 2px);
    box-shadow: 1px 1px 0 #fff;
}

/* ── TELA DE SUCESSO ── */
#tela-sucesso {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #ffbd59;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    padding: 40px;
    box-sizing: border-box;
    font-family: 'Nunito', sans-serif;
}

.btn-voltar-sucesso {
    align-self: flex-start;
    background-color: #0f0741;
    color: white;
    border: none;
    padding: 12px 32px;
    border-radius: 24px;
    font-weight: bold;
    font-size: 1rem;
    cursor: pointer;
    margin-top: 40px;
    margin-left: 40px;
}

.conteudo-sucesso {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    color: white;
    text-align: center;
    padding-bottom: 10vh;
}

.conteudo-sucesso h2 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 24px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.conteudo-sucesso h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 24px;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.emoji-olhos {
    font-size: 1.8rem;
    line-height: 1;
    display: inline-block;
    vertical-align: middle;
}

.conteudo-sucesso p {
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    color: #4a4a4a;
}

/* ── BOTÃO TRIGGER DO MODAL HISTÓRICO ── */
.btn-abrir-historico {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background-color: #0f0741;
    color: #ffbd59;
    border: 2px solid #0f0741;
    padding: 10px 22px;
    border-radius: 24px;
    font-weight: 800;
    font-size: 0.95rem;
    cursor: pointer;
    font-family: 'Nunito', sans-serif;
    box-shadow: 3px 3px 0 #fff;
    transition: transform 0.15s, box-shadow 0.15s;
}

.btn-abrir-historico:hover {
    transform: translate(-2px, -2px);
    box-shadow: 5px 5px 0 #fff;
}

.btn-abrir-historico:active {
    transform: translate(1px, 1px);
    box-shadow: 1px 1px 0 #fff;
}

.btn-abrir-historico svg {
    flex-shrink: 0;
}

/* ── MODAL DE HISTÓRICO ── */
.overlay-historico {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 7, 65, 0.65);
    backdrop-filter: blur(4px);
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 10000;
}

.overlay-historico.open {
    display: flex;
}

.modal-historico {
    background: #ffffff;
    border: 2px solid #0f0741;
    border-radius: 28px;
    padding: 28px;
    width: 100%;
    max-width: 560px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 6px 6px 0 #0f0741;
    display: flex;
    flex-direction: column;
    gap: 20px;
    box-sizing: border-box;
    animation: modalFadeIn 0.2s ease;
}

@keyframes modalFadeIn {
    from { opacity: 0; transform: scale(0.96); }
    to { opacity: 1; transform: scale(1); }
}

.modal-historico-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    border-bottom: 2px solid rgba(15, 7, 65, 0.1);
    padding-bottom: 16px;
}

.modal-historico-titulo {
    font-family: 'League Spartan', sans-serif;
    font-size: 1.35rem;
    font-weight: 800;
    color: #0f0741;
    margin: 0;
    text-transform: uppercase;
}

.modal-historico-sub {
    font-size: 0.85rem;
    font-weight: 600;
    color: #555;
    margin: 4px 0 0 0;
}

.btn-fechar-historico {
    background: none;
    border: none;
    font-size: 2rem;
    line-height: 1;
    color: #0f0741;
    cursor: pointer;
    font-weight: bold;
    padding: 0 4px;
    transition: transform 0.1s;
}

.btn-fechar-historico:hover {
    transform: scale(1.15);
}

.historico-lista {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.historico-card {
    background: #fbf6e5;
    border: 2px solid #0f0741;
    border-radius: 20px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    box-shadow: 3px 3px 0 #0f074115;
    transition: transform 0.15s, box-shadow 0.15s;
}

.historico-card:hover {
    transform: translateY(-2px);
    box-shadow: 4px 4px 0 #0f0741;
}

.historico-card-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.historico-rota {
    font-weight: 800;
    font-size: 0.95rem;
    color: #0f0741;
    display: flex;
    align-items: center;
    gap: 8px;
}

.historico-tag-sentido {
    font-size: 0.72rem;
    font-weight: 800;
    background: #0f0741;
    color: #ffbd59;
    padding: 2px 8px;
    border-radius: 10px;
    text-transform: uppercase;
}

.historico-detalhes {
    font-size: 0.82rem;
    font-weight: 600;
    color: #4a4a4a;
}

.btn-reanunciar-card {
    background-color: #0f0741;
    color: #ffbd59;
    border: 2px solid #0f0741;
    border-radius: 18px;
    padding: 10px 20px;
    font-size: 0.88rem;
    font-weight: 800;
    cursor: pointer;
    font-family: 'Nunito', sans-serif;
    white-space: nowrap;
    box-shadow: 2px 2px 0 #0f074133;
    transition: all 0.15s;
}

.btn-reanunciar-card:hover {
    background-color: #ffbd59;
    color: #0f0741;
    box-shadow: 3px 3px 0 #0f0741;
}

/* ── RESPONSIVIDADE ── */
@media (max-width: 768px) {
    #app-content {
        padding: 20px 16px !important;
        gap: 24px !important;
    }

    .header-top h1 {
        font-size: 1.5rem;
    }

    .back-btn {
        margin-left: 60px;
    }

    .form-container {
        padding: 24px 16px;
        border-radius: 20px;
    }

    .form-row {
        flex-direction: column;
        gap: 0;
    }

    .sentido-group {
        flex-direction: column;
    }

    .historico-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .btn-reanunciar-card {
        width: 100%;
        text-align: center;
    }
}
