/* --- ESTILOS ESPECÃFICOS PARA areacliente.html --- */

.client-body #clientDashboard {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.client-body .header {
    background: rgba(1, 1, 1, 0.488);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border-bottom: 1px solid var(--glass-border-color);

    padding: calc(15px + env(safe-area-inset-top, 0px)) 30px 15px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    column-gap: 24px;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.client-body .header .logo {
    width: calc(40px * 182 / 103);
    height: 40px;
    flex-shrink: 0;
    justify-self: start;
}

.client-body .header .logo img {
    width: 100%;
    height: 100%;
    display: block;
    border-radius: 8px;
    object-fit: contain;
}

.client-body .header-nav {
    display: flex;
    gap: 14px;
    align-items: center;
    min-height: 44px;
    justify-content: center;
    justify-self: center;
}

.client-body .header-nav a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: var(--pill-border-radius);
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
}

.client-body .header-nav a:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.client-body .header-nav a.active {
    background-color: var(--accent-color);
    color: white;
}

.client-body .user-menu {
    display: flex;
    align-items: center;
    gap: 12px;
    justify-self: end;
}

.client-body .user-menu span {
    font-weight: 500;
}

.user-menu-auth {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-greeting {
    font-weight: 500;
    letter-spacing: 0.02em;
}

.user-avatar-button {
    border: none;
    background: rgba(255, 255, 255, 0.08);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.2);
}

.user-avatar-button:hover {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.18);
}

.user-avatar-button.is-default-avatar {
    background: rgba(255, 255, 255, 0.08) url('assets/profile.webp') center/cover no-repeat;
}

.user-avatar-button.is-default-avatar .user-avatar-image {
    opacity: 0;
}

.user-avatar-button.is-active {
    box-shadow: 0 0 0 2px var(--accent-color);
}

.user-avatar-button:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

.user-avatar-image {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center;
    border-radius: 50%;
}

.btn-inline {
    width: auto !important;
    min-width: 0;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-outline {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.35);
    color: var(--text-color);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.45);
}

.dashboard-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: var(--pill-border-radius);
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(0, 0, 0, 0.25);
    color: var(--text-color);
    font-size: 0.85rem;
    text-decoration: none;
    transition: background 0.3s ease, border-color 0.3s ease;
}

.dashboard-link:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.3);
}

.dashboard-return-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: var(--pill-border-radius);
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(0, 0, 0, 0.18);
    color: var(--text-color);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s ease, border-color 0.3s ease, transform 0.2s ease;
}

.dashboard-return-btn i {
    font-size: 0.95rem;
}

.dashboard-return-btn:hover {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.32);
    transform: translateY(-1px);
}

.dashboard-return-btn:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.6);
    outline-offset: 3px;
}

.client-body .logout-btn {
    background: none;
    border: none;
    color: var(--text-color-muted);
    cursor: pointer;
    font-size: 1rem;
    transition: color 0.3s ease;
}

.client-body .logout-btn:hover {
    color: var(--danger-color);
}

.client-body .content {
    padding: 30px;
    flex: 1;
    overflow: visible;
}

/* --- ESTILO PARA LIMITAR LARGURA DOS CARDS --- */
.card {
    max-width: 960px;
    margin: 10px auto 25px auto;
    /* Reduzido espaçamento superior */
}

/* Se o primeiro card precisa de menos espaço ainda */
.card:first-child {
    margin-top: 5px;
}

/* Card de busca precisa de z-index para o autocomplete aparecer por cima */
.search-card {
    position: relative;
    z-index: 20;
    margin-top: 5px;
    /* Menos espaço no topo */
}

.profile-card {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.profile-card-header h2 {
    margin: 0;
}

.profile-photo-section {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}

.profile-photo-preview {
    width: 112px;
    height: 112px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-photo-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-photo-controls {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
    max-width: 320px;
}

.profile-photo-hint {
    font-size: 0.75rem;
    color: var(--text-color-muted);
}

.profile-form {
    display: grid;
    gap: 16px;
}

.profile-notifications-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.profile-notifications-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-weight: 500;
}

.profile-notifications-group small {
    color: var(--text-color-muted);
    font-size: 0.8rem;
}

.profile-form-actions {
    display: flex;
    justify-content: flex-start;
}

.profile-feedback {
    margin-top: 10px;
    font-size: 0.85rem;
}

.profile-feedback.success {
    color: var(--success-color);
}

.profile-feedback.error {
    color: var(--danger-color);
}

.profile-feedback.info {
    color: var(--text-color-muted);
}

.search-card .glass-effect {
    padding-top: 20px;
    /* Menos padding no topo */
    padding-bottom: 30px;
}

/* Ajuste no título do card */
.card h2,
.card h3 {
    margin-top: 0;
    margin-bottom: 20px;
    line-height: 1.3;
}

.encomenda-card {
    max-width: 960px;
}

.encomenda-card h2 {
    display: flex;
    align-items: center;
    gap: 10px;
}

.encomenda-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.encomenda-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.encomenda-contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}

.encomenda-form .form-group label,
.encomenda-form .form-group-inline label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: var(--text-color-muted);
}

.encomenda-form input,
.encomenda-form select,
.encomenda-form textarea {
    width: 100%;
    padding: 12px;
    border-radius: var(--glass-border-radius-small);
    border: 1px solid var(--glass-border-color);
    background: rgba(0, 0, 0, 0.25);
    color: var(--text-color);
    resize: none;
}

.encomenda-form textarea {
    min-height: 110px;
}

.encomenda-submit-btn {
    align-self: flex-start;
    min-width: 200px;
}

.encomenda-feedback {
    margin-top: 10px;
    font-size: 0.9rem;
    color: var(--text-color-muted);
}

.encomenda-feedback.success {
    color: var(--success-color);
}

.encomenda-feedback.erro {
    color: var(--danger-color);
}

.encomenda-card-header {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 14px;
}

.encomenda-hint {
    color: var(--text-color-muted);
    font-size: 0.9rem;
}

.encomenda-placeholder {
    text-align: center;
    margin: 20px 0;
    color: var(--text-color-muted);
}

.encomenda-placeholder.erro {
    color: var(--danger-color);
}

.encomendas-historico-container {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.encomenda-list-item {
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--glass-border-radius-small);
    padding: 16px;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.encomenda-list-item header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.encomenda-list-item dl {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px 20px;
    margin: 0;
}

.encomenda-list-item dt {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-color-muted);
    margin-bottom: 4px;
}

.encomenda-list-item dd {
    margin: 0;
    color: var(--text-color);
    line-height: 1.4;
}

.encomenda-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 10px;
    border-radius: var(--pill-border-radius);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.encomenda-status--solicitada {
    background: rgba(10, 132, 255, 0.18);
    color: #8ec5ff;
}

.encomenda-status--em-andamento {
    background: rgba(250, 204, 21, 0.2);
    color: #fcd34d;
}

.encomenda-status--entregue {
    background: rgba(48, 209, 88, 0.2);
    color: #6ee7b7;
}

.encomenda-status--cancelada {
    background: rgba(255, 69, 58, 0.2);
    color: #fca5a5;
}

@media (max-width: 768px) {
    .encomenda-form-grid {
        grid-template-columns: 1fr;
    }
    .encomenda-submit-btn {
        width: 100%;
    }
}

@media (max-width: 540px) {
    .profile-photo-section {
        justify-content: center;
        text-align: center;
    }

    .profile-photo-controls {
        align-items: center;
    }
}

/* --- ESTILOS PARA O FORMULÃRIO DE BUSCA DE VIAGEM (NOVO) --- */
.search-trip-form {
    display: flex;
    gap: 15px;
    align-items: flex-end;
    /* Alinha os itens pela base */
}

.form-group-inline {
    flex: 1;
    /* Permite que os campos cresÃ§am para ocupar o espaÃ§o */
    min-width: 180px;
    /* Largura mÃ­nima para cada campo */
}

/* Adicionado para o Autocomplete funcionar */
.autocomplete-container {
    position: relative;
}

.form-group-inline label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-color-muted);
    font-size: 0.9rem;
}

.form-group-inline input {
    width: 100%;
    padding: 12px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border-color);
    border-radius: var(--glass-border-radius-small);
    color: var(--text-color);
    font-size: 1rem;
    font-family: var(--font-family);
    transition: all 0.3s ease;
    color-scheme: dark;
}

.form-group-inline input[type="date"] {
    -webkit-appearance: none;
    appearance: none;
    padding-right: 42px;
    position: relative;
}

.form-group-inline input[type="date"]::-webkit-calendar-picker-indicator {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    opacity: 0.8;
    filter: invert(1) drop-shadow(0 2px 3px rgba(0, 0, 0, 0.35));
    cursor: pointer;
}

.form-group-inline input[type="date"]:hover::-webkit-calendar-picker-indicator,
.form-group-inline input[type="date"]:focus::-webkit-calendar-picker-indicator {
    opacity: 1;
}

.search-trip-form .btn {
    padding: 0;
    margin: 0;
    width: 48px;
    height: 48px;
    min-width: unset;
    flex-shrink: 0;
    font-size: 1.2rem;
}

.autocomplete-item {
    padding: 12px 15px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.autocomplete-item:hover {
    background-color: var(--accent-color);
}

/* --- ESTILOS ANTIGOS (CONTINUAM AQUI) --- */

.trip-list .trip-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid var(--glass-border-color);
    flex-wrap: wrap;
    gap: 15px;
    z-index: 0;
}

.trip-list .trip-item:last-child {
    border-bottom: none;
}

.trip-item .details {
    font-size: 1.1rem;
}

.trip-item .details span {
    display: block;
    font-size: 0.9rem;
    color: var(--text-color-muted);
}

.status {
    font-weight: 600;
    padding: 6px 14px;
    border-radius: var(--pill-border-radius);
    font-size: 0.8rem;
    color: #fff;
}

.status.confirmed {
    background-color: var(--success-color);
}

.status.completed {
    background-color: #8E8E93;
}

.status.canceled {
    background-color: var(--danger-color);
}

/* --- NAVEGAÃ‡ÃƒO MOBILE --- */
.mobile-nav {
    display: none;
    position: fixed;
    left: 50%;
    bottom: calc(12px + env(safe-area-inset-bottom, 0));
    transform: translateX(-50%);
    width: min(360px, calc(100% - 24px));
    padding: 0;
    z-index: 3000;
    pointer-events: none;
}

.mobile-nav-bar {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
    padding: 8px 12px;
    background: linear-gradient(165deg, rgba(20, 24, 35, 0.9), rgba(10, 12, 18, 0.74));
    border-radius: 32px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 14px 30px rgba(5, 8, 16, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(20px) saturate(165%);
    -webkit-backdrop-filter: blur(20px) saturate(165%);
    pointer-events: auto;
}

.nav-indicator {
    position: absolute;
    top: 2px;
    left: 0;
    height: calc(100% - 4px);
    width: 0;
    background: rgba(255, 255, 255, 0.16);
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.11), 0 10px 20px rgba(6, 12, 24, 0.25);
    transition: all 0.35s cubic-bezier(0.68, -0.4, 0.32, 1.4);
    z-index: 0;
}

.mobile-nav-btn {
    background: transparent;
    border: none;
    color: rgba(245, 245, 247, 0.72);
    padding: 6px 12px;
    border-radius: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: color 0.3s ease, transform 0.3s ease;
    min-width: 64px;
    height: 48px;
    z-index: 1;
    position: relative;
    -webkit-tap-highlight-color: transparent;
}

.mobile-nav-btn:focus,
.mobile-nav-btn:focus-visible {
    outline: none;
    color: rgba(255, 255, 255, 0.92);
}

.mobile-nav-btn svg {
    width: 20px;
    height: 20px;
}

.mobile-nav-btn .nav-text {
    font-size: 10.2px;
    font-weight: 500;
    margin-top: 3px;
    letter-spacing: 0.02em;
}

.mobile-nav-btn.active {
    color: #ffffff;
    transform: translateY(-2px);
}

.mobile-nav-btn:hover {
    color: rgba(245, 245, 247, 0.9);
}

/* --- RESPONSIVIDADE PARA AREA DO CLIENTE --- */
@media (max-width: 992px) {

    /* Em telas menores, permite que o formulÃ¡rio quebre a linha */
    .search-trip-form {
        flex-wrap: wrap;
    }
}

@media (max-width: 768px) {

    .client-body .header-nav {
        display: none;
    }

    .client-body .header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: calc(16px + env(safe-area-inset-top, 0px)) 20px 16px;
        gap: 14px;
    }

    .client-body .user-menu {
        display: flex;
        gap: 10px;
        justify-self: end;
    }

    .user-greeting {
        display: none;
    }

    .user-avatar-button {
        width: 40px;
        height: 40px;
    }

    .user-menu-auth .dashboard-return-btn {
        padding: 0;
        width: 40px;
        height: 40px;
        border-radius: 12px;
        justify-content: center;
    }

    .user-menu-auth .dashboard-return-btn span {
        display: none;
    }

    .client-body .content {
        padding: 24px 18px calc(12px + env(safe-area-inset-bottom, 0));
    }

    .site-footer {
        padding-top: 24px;
        padding-bottom: calc(24px + env(safe-area-inset-bottom, 0));
    }

    .client-body .mobile-nav {
        display: block;
    }
}

/* --- ESTILOS PARA OS RESULTADOS DE VIAGEM --- */
.trip-results-list {
    margin-top: 15px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding-bottom: calc(80px + env(safe-area-inset-bottom, 0));
}

.trip-result-item {
    padding: 18px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    max-width: 960px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}

/* --- MINHAS VIAGENS --- */
.my-trips-card {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.my-trips-loading {
    font-size: 0.9rem;
    color: var(--text-color-muted);
}

.my-trips-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.my-trips-section-header h3 {
    margin: 0;
    font-size: 1.1rem;
}

.my-trips-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.my-trip-item {
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.my-trip-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.my-trip-route {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-color);
}

.my-trip-date {
    font-size: 0.9rem;
    color: var(--text-color-muted);
}

.my-trip-body {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 16px;
    flex-wrap: wrap;
}

.my-trip-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 0.86rem;
    color: var(--text-color-muted);
}

.my-trip-info span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.my-trip-info span i {
    font-size: 0.78rem;
}

.my-trip-tags {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.my-trip-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.my-trip-cancel-btn {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 999px;
    border: 1px solid rgba(239, 68, 68, 0.45);
    background: transparent;
    color: #ef4444;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.my-trip-cancel-btn:hover:not(:disabled) {
    background: rgba(239, 68, 68, 0.12);
}

.my-trip-cancel-btn:disabled {
    opacity: 0.6;
    cursor: default;
}

.my-trip-cancel-message {
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    font-size: 0.85rem;
}

.my-trip-cancel-message p {
    margin: 0 0 8px;
    color: var(--text-color);
}

.my-trip-whatsapp-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 999px;
    background: #25d366;
    color: #fff;
    font-weight: 600;
    font-size: 0.85rem;
    text-decoration: none;
    transition: background 0.2s ease, transform 0.2s ease;
}

.my-trip-whatsapp-btn:hover {
    background: #1fb857;
    transform: translateY(-1px);
}

.my-trip-whatsapp-btn.is-disabled {
    background: rgba(148, 163, 184, 0.4);
    color: #1e293b;
    cursor: not-allowed;
    pointer-events: none;
}

.my-trip-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(16, 152, 255, 0.15);
    color: var(--accent-color);
    font-size: 0.78rem;
    font-weight: 500;
}

.my-trip-badge i {
    font-size: 0.75rem;
}

.my-trip-status {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 500;
    text-transform: capitalize;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-color);
}

.my-trip-status--planejada {
    background: rgba(16, 152, 255, 0.12);
    color: rgba(16, 152, 255, 0.95);
}

.my-trip-status--emrota {
    background: rgba(250, 204, 21, 0.18);
    color: #fcd34d;
}

.my-trip-status--concluida {
    background: rgba(46, 204, 113, 0.18);
    color: #34d399;
}

.my-trip-status--cancelada {
    background: rgba(255, 71, 87, 0.18);
    color: #ff4757;
}

.my-trips-empty {
    font-size: 0.85rem;
    color: var(--text-color-muted);
    margin: 0;
}

/* Detalhes da Viagem (Origem, Rota, Destino) */
.trip-details {
    display: flex;
    gap: 20px;
    flex-grow: 1;
    align-items: center;
    flex-direction: row;
    /* Centraliza verticalmente */
    width: 100%;
}

.trip-time-location {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 85px;
    /* Largura mínima fixa para manter alinhamento */
    max-width: 85px;
    /* Largura máxima para evitar expansão */
}

.trip-time-location.trip-departure {
    align-items: flex-start;
    text-align: left;
}

.trip-time-location.trip-arrival {
    align-items: flex-end;
    text-align: right;
}

.trip-time-location .time {
    font-size: 1.5rem;
    font-weight: 500;
    line-height: 1.2;
    /* Controla altura da linha */
}

.trip-time-location .city {
    font-size: 0.9rem;
    color: var(--text-color-muted);
    line-height: 1.3;

    /* Truncamento com ... para textos longos */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 160px;
    /* Garante que respeite o container */
}

.trip-route-info {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 200px;
    /* Reduzido de 225px */
    max-width: 200px;
    /* Garante largura fixa */
    color: var(--text-color-muted);
    font-size: 0.8rem;
    justify-content: center;
    /* Centraliza o conteúdo */
}

.trip-route-info .route-line {
    flex-grow: 1;
    border-bottom: 2px dotted var(--text-color-muted);
    min-width: 30px;
    /* Largura mínima para a linha */
}

.trip-route-info .route-details-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    /* Reduzido de 10px */
    flex-shrink: 0;
    /* Não encolhe */
    max-width: 180px;
    width: 100%;
}

.trip-route-info .route-name {
    font-size: 0.6rem;
    background-color: rgba(255, 255, 255, 0.05);
    padding: 2px 8px;
    border-radius: var(--pill-border-radius);
    white-space: nowrap;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

.route-details-center .duration {
    font-size: 0.6rem;
    white-space: nowrap;
}

.trip-company {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-grow: 1;
    min-width: 180px;
    /* Largura mínima */
}

.trip-company img {
    height: 40px;
    width: auto;
    /* Permite proporção natural */
    max-width: 120px;
    /* Limita largura máxima */
    object-fit: contain;
    /* Mantém proporção */
}

.trip-company .duration {
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
}

/* Preço e Botão de Agendar */
.trip-action {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-shrink: 0;
    /* Não encolhe */
}

.trip-price {
    text-align: center;
    min-width: 80px;
    /* Largura mínima para consistência */
}

.price-currency {

    font-size: 1rem;

    font-weight: 250;

    margin-right: 2px;

    align-self: flex-start;

    margin-top: 4px;

}



.price-integer {

    font-size: 1.8rem;

    font-weight: 300;

    line-height: 1;

}

.price-decimals {

    font-size: 1rem;

    font-weight: 250;

}

.trip-action .btn {
    margin-bottom: 12px;
    width: 120px;
    padding: 12px;
    flex-shrink: 0;
}

/* --- RESPONSIVIDADE PARA O CARD DE VIAGEM --- */
@media (max-width: 768px) {
    .trip-result-item {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(160px, 1fr) minmax(0, 1fr);
        grid-template-areas:
            "departure route arrival"
            "company action action";
        padding: 16px;
        column-gap: 12px;
        row-gap: 16px;
        align-items: center;
    }

    .trip-result-item .trip-time-location {
        gap: 6px;
    }

    .trip-result-item .trip-time-location.trip-departure {
        grid-area: departure;
        align-items: flex-start;
        text-align: left;
        justify-self: start;
    }

    .trip-result-item .trip-time-location.trip-arrival {
        grid-area: arrival;
        align-items: flex-end;
        text-align: right;
        justify-self: end;
    }

    .trip-time-location {
        min-width: 0;
        max-width: none;
    }

    .trip-time-location .time {
        font-size: 1.28rem;
    }

    .trip-time-location .city {
        font-size: 0.84rem;
        max-width: 100%;
        word-break: break-word;
    }

    .trip-route-info {
        grid-area: route;
        justify-self: center;
        width: 100%;
        min-width: 160px;
        max-width: 220px;
        flex-direction: row;
        align-items: center;
        justify-content: center;
        gap: 8px;
    }

    .trip-route-info .route-line {
        display: block;
        flex: 0 0 26px;
        border-bottom: 2px dotted var(--text-color-muted);
        height: 0;
    }

    .trip-route-info .route-details-center {
        align-items: center;
        text-align: center;
        gap: 4px;
        max-width: 190px;
        width: 100%;
    }

    .trip-route-info i {
        flex: 0 0 18px;
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
        color: var(--text-color-muted);
    }

    .trip-route-info .route-name {
        font-size: 0.68rem;
        padding: 4px 12px;
        white-space: nowrap;
        max-width: 190px;
    }

    .route-details-center .duration {
        font-size: 0.68rem;
    }

    .trip-company {
        grid-area: company;
        width: 100%;
        justify-content: flex-start;
        align-items: center;
        gap: 12px;
        padding: 0;
        border: none;
        margin: 0;
        min-width: 0;
    }

    .trip-company img {
        height: 34px;
        max-width: 110px;
    }

    .trip-action {
        grid-area: action;
        width: 100%;
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        flex-wrap: wrap;
    }

    .trip-price {
        display: flex;
        justify-content: flex-end;
        align-items: baseline;
        gap: 4px;
        margin-left: auto;
        min-width: auto;
        text-align: right;
        flex: 0 0 auto;
    }

    .price-integer {
        font-size: 1.5rem;
    }

    .price-currency,
    .price-decimals {
        font-size: 0.9rem;
    }

    .trip-action .btn {
        flex: 0 0 auto;
        width: auto;
        min-width: 128px;
        padding: 12px 18px;
        font-size: 0.95rem;
        margin-bottom: 0;
    }
}
/* --- ESTILOS ESPECÃFICOS PARA index.html (modal de login) --- */
.login-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    overflow-y: auto;
}

.login-container {
    width: 100%;
    max-width: 420px;
    text-align: center;
    padding: 40px;
    max-height: 90vh;
    overflow-y: auto;
    /* Garante que o conteúdo do modal role se necessário */
}

.login-container .logo {
    width: 120px;
    height: auto;
    aspect-ratio: 182 / 103;
    margin: 0 auto 25px;
    display: block;
    object-fit: contain;
}

.login-header h2 {
    margin: 0 0 8px;
    font-size: 2rem;
    font-weight: 700;
}

.login-header p {
    margin: 0 0 20px;
    color: var(--text-color-muted);
}

.auth-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
}

.btn-google img {
    width: 20px;
    height: 20px;
}

.back-link {
    display: inline-block;
    margin-top: 25px;
    color: var(--text-color-muted);
    text-decoration: none;
    transition: color 0.3s;
}

.back-link:hover {
    color: var(--accent-color);
}

.error-message {
    color: var(--danger-color);
    font-size: 14px;
    margin-top: 15px;
    display: none;
}

.register-link {
    margin-top: 30px;
    font-size: 14px;
    color: var(--text-color-muted);
}

.register-link a {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 500;
}

.register-link a:hover {
    text-decoration: underline;
}

.checkbox-group {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 15px;
    color: var(--text-color);
    font-size: 0.9rem;
    padding: 8px 5px;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 51px;
    height: 31px;
    flex-shrink: 0;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.2);
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 23px;
    width: 23px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked+.slider {
    background-color: var(--success-color);
}

input:checked+.slider:before {
    transform: translateX(20px);
}

.simple-checkbox-group {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 12px 0 18px;
    text-align: left;
    font-size: 0.9rem;
    color: var(--text-color-muted);
}

.simple-checkbox-group input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: var(--accent-color);
}

.auth-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.auth-actions .link-small {
    font-size: 0.9rem;
    color: var(--accent-color);
    text-decoration: none;
}

.auth-actions .link-small:hover {
    text-decoration: underline;
}

.auth-actions .back-link {
    margin-left: auto;
}

/* Animações de cards */
.card-animation-ready {
    opacity: 0;
}

.animate-fade-up {
    animation: cardFadeUp 0.45s ease forwards;
    animation-delay: calc(var(--card-index, 0) * 0.08s);
}

.animate-slide-in-forward {
    animation: cardSlideInForward 0.45s ease forwards;
    animation-delay: calc(var(--card-index, 0) * 0.08s);
}

.animate-slide-in-backward {
    animation: cardSlideInBackward 0.45s ease forwards;
    animation-delay: calc(var(--card-index, 0) * 0.08s);
}

.primary-card-animating {
    will-change: transform, opacity;
}

.primary-card-carousel-forward {
    animation: primaryCardCarouselForward 0.45s cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
}

.primary-card-carousel-backward {
    animation: primaryCardCarouselBackward 0.45s cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
}

.primary-card-fade-in {
    animation: primaryCardFadeIn 0.45s ease forwards;
}

@keyframes primaryCardCarouselForward {
    from {
        opacity: 0;
        transform: translateX(32px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

@keyframes primaryCardCarouselBackward {
    from {
        opacity: 0;
        transform: translateX(-32px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

@keyframes primaryCardFadeIn {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 992px) {
    #pageContent {
        position: relative;
    }

    .page-transition-out-forward,
    .page-transition-out-backward,
    .page-transition-in-forward,
    .page-transition-in-backward {
        animation-duration: 0.35s;
        animation-timing-function: ease;
        animation-fill-mode: both;
        will-change: transform, opacity;
    }

    .page-transition-out-forward {
        animation-name: pageSlideOutForward;
    }

    .page-transition-out-backward {
        animation-name: pageSlideOutBackward;
    }

    .page-transition-in-forward {
        animation-name: pageSlideInForward;
    }

    .page-transition-in-backward {
        animation-name: pageSlideInBackward;
    }

    @keyframes pageSlideOutForward {
        from {
            transform: translateX(0);
            opacity: 1;
        }
        to {
            transform: translateX(-20%);
            opacity: 0;
        }
    }

    @keyframes pageSlideOutBackward {
        from {
            transform: translateX(0);
            opacity: 1;
        }
        to {
            transform: translateX(20%);
            opacity: 0;
        }
    }

    @keyframes pageSlideInForward {
        from {
            transform: translateX(20%);
            opacity: 0;
        }
        to {
            transform: translateX(0);
            opacity: 1;
        }
    }

    @keyframes pageSlideInBackward {
        from {
            transform: translateX(-20%);
            opacity: 0;
        }
        to {
            transform: translateX(0);
            opacity: 1;
        }
    }
}

@keyframes cardFadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes cardSlideInForward {
    from {
        opacity: 0;
        transform: translateX(45px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes cardSlideInBackward {
    from {
        opacity: 0;
        transform: translateX(-45px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .card-animation-ready,
    .animate-fade-up,
    .animate-slide-in-forward,
    .animate-slide-in-backward,
    .page-transition-out-forward,
    .page-transition-out-backward,
    .page-transition-in-forward,
    .page-transition-in-backward,
    .primary-card-animating,
    .primary-card-carousel-forward,
    .primary-card-carousel-backward,
    .primary-card-fade-in {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
}

/* Estilo para o Overlay de Carregamento */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: none;
    /* ComeÃ§a escondido */
    justify-content: center;
    align-items: center;
    z-index: 5000;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* --- ESTILOS PARA O MODAL DE TERMOS (NOVO) --- */
.modal-content h4 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.modal-content p {
    margin-bottom: 25px;
    line-height: 1.6;
    color: var(--text-color-muted);
}

.modal-content a {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 500;
}

.modal-content a:hover {
    text-decoration: underline;
}

.autocomplete-container {
    position: relative;
}

.autocomplete-results {
    position: absolute;
    top: 100%;
    margin-top: -1px;
    left: 0;
    right: 0;
    background: var(--glass-background);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border-color);
    border-top: none;
    border-radius: 0 0 var(--glass-border-radius-small) var(--glass-border-radius-small);
    z-index: 9999;
    max-height: 200px;
    overflow-y: auto;
    overscroll-behavior: contain;
    display: none;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    padding-bottom: 6px;
}

/* Quando o input estÃ¡ em foco, remove a borda inferior para conectar com o dropdown */
.form-group-inline input:focus+.autocomplete-results,
.autocomplete-container input:focus+.autocomplete-results {
    border-top-left-radius: 0;
    border-top-right-radius: 0;
}

/* Estilo especial para o input quando o dropdown estÃ¡ visÃ­vel */
.autocomplete-container input:focus {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    border-bottom-color: transparent;
    box-shadow: 0 22px 24px rgba(0, 0, 0, 0.35);
}

.autocomplete-item {
    padding: 12px 15px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-color);
}

.autocomplete-item:last-child {
    border-bottom: none;
}

.autocomplete-item:hover,
.autocomplete-item.selected {
    background-color: var(--accent-color);
    color: white;
}

.autocomplete-item.no-results,
.autocomplete-item.error {
    padding: 12px 15px;
    color: var(--text-color-muted);
    font-style: italic;
    cursor: default;
    text-align: center;
}

.autocomplete-item.loading {
    padding: 12px 15px;
    color: var(--text-color-muted);
    font-style: italic;
    cursor: default;
    text-align: center;
    animation: pulse 1.5s ease-in-out infinite;
}

.autocomplete-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 15px;
}

.autocomplete-loading .loading-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent-color, #3b82f6);
    opacity: 0.75;
    animation: loadingDots 0.8s ease-in-out infinite;
}

.autocomplete-loading .loading-dot:nth-child(2) {
    animation-delay: 0.15s;
}

.autocomplete-loading .loading-dot:nth-child(3) {
    animation-delay: 0.3s;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

@keyframes loadingDots {
    0% { transform: translateY(0); opacity: 0.4; }
    50% { transform: translateY(-4px); opacity: 1; }
    100% { transform: translateY(0); opacity: 0.4; }
}

/* Melhorias no campo de input */
.form-group-inline input:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(10, 132, 255, 0.3);
}

/* Scrollbar personalizada para o dropdown */
.autocomplete-results::-webkit-scrollbar {
    width: 6px;
}

.autocomplete-results::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.autocomplete-results::-webkit-scrollbar-thumb {
    background: var(--accent-color);
    border-radius: 3px;
}

.autocomplete-results::-webkit-scrollbar-thumb:hover {
    background: var(--accent-color-hover);
}
/* --- ESTILOS PARA MODAL DE SELEÇÃO DE ASSENTO --- */

.seat-selection-modal-content {
    max-width: 480px;
    text-align: center;
    padding: 24px 28px 30px;
    position: relative;
}

.disclaimer {
    font-size: 0.8rem;
    color: var(--text-color-muted);
    margin-top: 15px;
}

.van-layout {
    position: relative;
    --van-layout-height: min(360px, 60vh);
    aspect-ratio: 181 / 563;
    height: var(--van-layout-height);
    width: calc(var(--van-layout-height) * 181 / 563);
    margin: 20px auto 16px;
    background: url('assets/van.webp') center / contain no-repeat;
}

.van-layout .seat {
    --seat-width: 19%;
    --seat-height: 9%;
    --seat-color: rgba(16, 152, 255, 0.85);
    position: absolute;
    left: var(--seat-x);
    top: var(--seat-y);
    transform: translate(-50%, -50%);
    width: var(--seat-width);
    height: var(--seat-height);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
    cursor: pointer;
    transition: transform 0.18s ease, filter 0.18s ease;
    background: none;
    border: none;
    padding: 0;
}

.van-layout .seat::before {
    content: '';
    position: absolute;
    inset: 0;
    background-color: var(--seat-color, transparent);
    -webkit-mask: url('assets/assento.webp') center / contain no-repeat;
    mask: url('assets/assento.webp') center / contain no-repeat;
    transition: background-color 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
    opacity: 0;
}

.van-layout .seat span {
    position: relative;
    z-index: 1;
    pointer-events: none;
}

.van-layout .seat:not(.occupied):hover {
    transform: translate(-50%, -50%) scale(1.06);
}

.van-layout .seat:not(.occupied):hover {
    transform: translate(-50%, -50%) scale(1.06);
}

.van-layout .seat:not(.occupied):hover::before,
.van-layout .seat.selected::before,
.van-layout .seat.occupied::before {
    opacity: 1;
}

.van-layout .seat:not(.occupied):hover {
    --seat-color: rgba(16, 152, 255, 0.85);
}

.van-layout .seat.selected {
    --seat-color: rgba(16, 185, 129, 0.95);
}

.van-layout .seat.selected::before {
    box-shadow: 0 0 0 5px rgba(16, 185, 129, 0.25);
}

.van-layout .seat.occupied {
    cursor: not-allowed;
    --seat-color: rgba(110, 114, 122, 0.9);
}

.van-layout .seat.occupied::before {
    filter: grayscale(0.3);
}

.van-layout .seat:focus-visible {
    outline: 2px solid rgba(16, 152, 255, 0.8);
    outline-offset: 2px;
}

.van-layout--message {
    width: 100%;
    aspect-ratio: auto;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px dashed rgba(255, 255, 255, 0.2);
    border-radius: 18px;
}

.seat-layout-warning {
    font-size: 0.9rem;
    color: var(--text-color-muted);
    margin: 0;
}

.seat-legend {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 12px 0 18px;
    font-size: 0.85rem;
    flex-wrap: wrap;
}

.seat-legend > div {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-color-muted);
}

.pickup-section {
    margin-top: 22px;
    text-align: left;
}

.pickup-section h4 {
    font-size: 1rem;
    margin-bottom: 10px;
    color: var(--text-color);
}

.pickup-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 14px;
}

.pickup-option {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 12px;
    border: 1px solid rgba(59, 130, 246, 0.25);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.08);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.pickup-option input[type="radio"] {
    margin-top: 4px;
}

.pickup-option-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.pickup-option-title {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-color);
}

.pickup-summary {
    font-size: 0.78rem;
    color: var(--text-color-muted);
    line-height: 1.35;
}

.pickup-option:focus-within,
.pickup-option:hover {
    border-color: rgba(59, 130, 246, 0.45);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.18);
}

.pickup-fields {
    display: grid;
    gap: 12px;
}

.pickup-fields .form-group {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.pickup-fields label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-color);
    margin-bottom: 4px;
}

.pickup-fields input {
    border-radius: 8px;
    border: 1px solid rgba(15, 23, 42, 0.15);
    padding: 10px 12px;
    font-size: 0.9rem;
    background: rgba(248, 250, 252, 0.95);
    color: #0f172a;
}

.pickup-fields input::placeholder {
    color: rgba(71, 85, 105, 0.85);
}

body.dark-mode .pickup-option {
    background: rgba(23, 32, 46, 0.8);
    border-color: rgba(59, 130, 246, 0.35);
}

body.dark-mode .pickup-fields input {
    background: rgba(15, 23, 42, 0.9);
    border-color: rgba(148, 163, 184, 0.4);
    color: #e2e8f0;
}

body.dark-mode .pickup-fields label {
    color: #e2e8f0;
}

.site-footer {
    margin-top: 60px;
    background: rgba(15, 23, 42, 0.9);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 40px 30px;
    color: #e2e8f0;
    min-height: 260px;
}

.site-footer .footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 36px;
    align-items: start;
    justify-items: center;
    text-align: center;
}

.site-footer h4 {
    margin: 0 0 10px;
    font-size: 1rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.site-footer a {
    color: #93c5fd;
    text-decoration: none;
    transition: color 0.2s ease;
}

.site-footer a:hover {
    color: #fff;
}

.footer-social {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
    text-align: center;
}

.footer-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-weight: 500;
}

.footer-social a i,
.footer-info span i {
    flex-shrink: 0;
    width: 1.25em;
}

.footer-info {
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-size: 0.95rem;
    width: 100%;
    max-width: 260px;
    align-items: center;
    text-align: center;
}

.footer-info span {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    justify-content: center;
}

.footer-info span i {
    margin-top: 2px;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 0.95rem;
    width: 100%;
    max-width: 220px;
    align-items: center;
    text-align: center;
}

.footer-bottom {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(148, 163, 184, 0.25);
    align-items: center;
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 6px;
    font-size: 0.9rem;
    color: #cbd5f5;
}

.footer-bottom strong {
    font-weight: 600;
    color: #fff;
}

@media (max-width: 640px) {
    .site-footer {
        padding: 32px 20px calc(150px + env(safe-area-inset-bottom, 0));
    }
    .site-footer .footer-content {
        justify-items: center;
    }
    .footer-social a span {
        font-size: 0.95rem;
    }
    .footer-info,
    .footer-links {
        align-items: center;
        text-align: center;
    }
    .footer-bottom {
        text-align: center;
    }
}

body.dark-mode .pickup-fields input::placeholder {
    color: rgba(148, 163, 184, 0.7);
}

body.dark-mode .my-trip-cancel-message {
    background: rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.35);
    color: #e2e8f0;
}

body.dark-mode .my-trip-cancel-btn {
    border-color: rgba(248, 113, 113, 0.55);
    color: #fca5a5;
}

body.dark-mode .my-trip-cancel-btn:hover:not(:disabled) {
    background: rgba(252, 165, 165, 0.18);
}

body.dark-mode .my-trip-whatsapp-btn {
    background: #22c55e;
    color: #0f172a;
}

body.dark-mode .my-trip-whatsapp-btn:hover {
    background: #16a34a;
}

body.dark-mode .my-trip-whatsapp-btn.is-disabled {
    background: rgba(148, 163, 184, 0.35);
    color: #e2e8f0;
}

.seat-example {
    width: 22px;
    aspect-ratio: 1 / 1.15;
    position: relative;
    display: inline-block;
}

.seat-example::before {
    content: '';
    position: absolute;
    inset: 0;
    -webkit-mask: url('assets/assento.webp') center / contain no-repeat;
    mask: url('assets/assento.webp') center / contain no-repeat;
}

.seat-example.available::before {
    background-color: rgba(16, 152, 255, 0.95);
}

.seat-example.occupied::before {
    background-color: rgba(110, 114, 122, 0.9);
}

.seat-example.selected::before {
    background-color: rgba(16, 185, 129, 0.95);
}

.seat-debug-panel {
    position: absolute;
    right: 16px;
    bottom: 86px;
    width: 220px;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 12px;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 5;
}

.seat-debug-panel[hidden] {
    display: none;
}

.seat-debug-panel header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.seat-debug-panel header strong {
    font-size: 0.85rem;
}

#seatDebugClose {
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
}

.seat-debug-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.seat-debug-grid label {
    display: flex;
    flex-direction: column;
    font-size: 0.72rem;
    color: var(--text-color-muted);
}

.seat-debug-grid input {
    margin-top: 4px;
    padding: 6px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-color);
    font-size: 0.78rem;
}

.seat-debug-actions {
    display: flex;
    justify-content: flex-end;
}

.seat-debug-hint {
    margin: 0;
    font-size: 0.7rem;
    color: var(--text-color-muted);
}

@media (max-width: 480px) {
    .van-layout .seat {
        --seat-width: 18%;
        --seat-height: 10.5%;
        font-size: 0.7rem;
    }
}




/* --- ESTILOS PARA MODAL DE SUCESSO --- */

.success-icon {

    font-size: 4rem;

    color: var(--success-color);

    margin-bottom: 20px;

}

#bookingValue {

    color: var(--accent-color);

    font-weight: bold;

}

/* --- FORMULÁRIO DE BUSCA MOBILE --- */
@media (max-width: 768px) {
    /* Formulário de busca em mobile */
    .search-trip-form {
        flex-direction: column;
        gap: 20px;
        align-items: stretch;
    }
    
    .search-trip-form .btn {
        width: 100%;
        height: 50px;
        font-size: 1.1rem;
    }
    
    .form-group-inline {
        min-width: unset;
    }
    
    /* Autocomplete em mobile */
    .autocomplete-results {
        max-height: 150px; /* Reduz altura em mobile */
        font-size: 0.9rem;
    }
    
    .autocomplete-item {
        padding: 15px;
    }
}

/* --- LAYOUT ESPECÍFICO PARA SMARTPHONES PEQUENOS --- */
@media (max-width: 480px) {
    .trip-result-item {
        grid-template-columns: minmax(0, 1fr) minmax(140px, 0.9fr) minmax(0, 1fr);
        grid-template-areas:
            "departure route arrival"
            "company action action";
        column-gap: 8px;
        row-gap: 14px;
        padding: 14px;
    }

    .trip-time-location .time {
        font-size: 1.12rem;
    }

    .trip-time-location .city {
        font-size: 0.74rem;
    }

    .trip-route-info {
        min-width: 140px;
        max-width: 190px;
        gap: 6px;
    }

    .trip-route-info .route-line {
        display: block;
        flex: 0 0 18px;
        border-bottom: 2px dotted var(--text-color-muted);
        height: 0;
    }

    .trip-route-info .route-details-center {
        max-width: 150px;
        width: 100%;
    }

    .trip-route-info .route-name {
        font-size: 0.58rem;
        padding: 3px 10px;
        max-width: 150px;
    }

    .route-details-center .duration {
        font-size: 0.58rem;
    }

    .trip-company {
        gap: 8px;
    }

    .trip-company img {
        height: 30px;
        max-width: 90px;
    }

    .price-integer {
        font-size: 1.35rem;
    }

    .price-currency,
    .price-decimals {
        font-size: 0.85rem;
    }

    .trip-action .btn {
        min-width: 110px;
        padding: 10px 16px;
        font-size: 0.9rem;
    }
}
/* --- CARDS GERAIS EM MOBILE --- */
@media (max-width: 768px) {
    .card {
        margin: 5px auto 20px auto;
        max-width: none;
    }
    
    .search-card {
        margin-top: 0;
    }
    
    .search-card .glass-effect {
        padding: 15px;
    }
    
    .card h2 {
        font-size: 1.4rem;
        margin-bottom: 15px;
    }
}

/* --- NAVEGAÇÃO MOBILE MELHORADA --- */
@media (max-width: 768px) {
    .mobile-nav {
        width: min(310px, calc(100% - 18px));
        padding: 0;
        bottom: calc(10px + env(safe-area-inset-bottom, 0));
    }

    .mobile-nav-bar {
        padding: 6px 10px;
        gap: 3px;
    }
    
    .mobile-nav-btn {
        min-width: 54px;
        height: 42px;
        padding: 5px 10px;
    }
    
    .mobile-nav-btn svg {
        width: 18px;
        height: 18px;
    }
    
    .mobile-nav-btn .nav-text {
        font-size: 9.6px;
        margin-top: 2px;
    }
    
    .nav-indicator {
        top: 2px;
        height: calc(100% - 4px);
    }
}

/* --- MODAL DE ASSENTOS EM MOBILE --- */
@media (max-width: 768px) {
    .seat-selection-modal-content {
        max-width: 350px;
        margin: 20px;
    }
    
    .van-layout {
        --van-layout-height: min(440px, 72vh);
        margin: 8px auto 12px;
    }
    
    .van-layout .seat {
        --seat-width: 16.5%;
        --seat-height: 9.5%;
        font-size: 0.72rem;
    }
    
    .seat-legend {
        gap: 15px;
        justify-content: center;
    }
    
    .seat-legend > div {
        gap: 6px;
        font-size: 0.8rem;
    }
    
    .seat-example {
        width: 18px;
    }

    .my-trip-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .my-trip-body {
        flex-direction: column;
        align-items: flex-start;
    }

    .my-trip-tags {
        justify-content: flex-start;
    }
}

/* --- ENCOMENDAS EM MOBILE --- */
@media (max-width: 768px) {
    .encomenda-form-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .encomenda-submit-btn {
        width: 100%;
        margin-top: 10px;
    }
    
    .encomenda-list-item dl {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .encomenda-list-item {
        padding: 12px;
    }
    
    .encomenda-list-item header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}
