/* Lokahi - Estilos CSS */

/* Configuração do Tailwind CSS */
.custom-marker, 
.custom-marker-origin, 
.custom-marker-destination, 
.custom-marker-current {
    background: transparent !important;
    border: none !important;
}

.marker-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
}

.marker-card {
    transform: translateY(-5px);
    z-index: 1000;
}

.marker-pin {
    position: relative;
}

.marker-pin::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 6px;
    height: 6px;
    background: white;
    border-radius: 50%;
}

/* Remover controles de roteamento do Leaflet (não usado mais) */
.leaflet-routing-container {
    display: none !important;
}

.leaflet-routing-alternatives-container {
    display: none !important;
}

/* Modal Styles */
.modal-overlay {
    background: rgba(47, 29, 82, 0.6);
    backdrop-filter: blur(8px);
}

.vehicle-card {
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid #e5e7eb;
    background: linear-gradient(135deg, #ffffff, #f9fafb);
}

.vehicle-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 35px rgba(255, 107, 53, 0.2);
    border-color: #FF6B35;
}

.vehicle-card.selected {
    border-color: #FF6B35;
    background: linear-gradient(135deg, #fff7ed, #fed7aa);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(255, 107, 53, 0.3);
}

.receipt {
    background: linear-gradient(135deg, #ffffff, #f8fafc);
    border: 2px solid #e2e8f0;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.receipt-header {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
}

.receipt-item {
    border-bottom: 1px dashed #cbd5e1;
}

/* Google Places Autocomplete removido - usando apenas nosso sistema customizado */

/* Loading indicator para pesquisa */
.search-loading {
    position: relative;
}

.search-loading::after {
    content: '';
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    border: 2px solid #f3f4f6;
    border-top: 2px solid #f97316;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Estilos para validação reativa */
.success-border {
    border-color: #10b981 !important;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1) !important;
}

.error-border {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1) !important;
}

.error-message {
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Estilos para FAQ Accordion */
.faq-accordion {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-accordion:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.faq-header {
    background: white;
    padding: 20px 24px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.3s ease;
    border-bottom: 1px solid #f3f4f6;
}

.faq-header:hover {
    background-color: #f9fafb;
}

.faq-header.active {
    background-color: #fef3f2;
    border-bottom-color: #f97316;
}

.faq-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    background: white;
}

.faq-content.open {
    max-height: 500px;
    padding: 0 24px 24px 24px;
}

.faq-icon {
    transition: transform 0.3s ease;
    color: #f97316;
}

.faq-icon.rotated {
    transform: rotate(180deg);
}

.faq-question {
    font-weight: 600;
    color: #1f2937;
    margin: 0;
}

.faq-answer {
    color: #6b7280;
    line-height: 1.6;
    margin: 0;
}

/* Otimizações para Mobile */
/* Controle de tamanhos para zoom 100% */
.text-4xl {
    font-size: 2.25rem !important;
    line-height: 2.5rem !important;
}

.text-3xl {
    font-size: 1.875rem !important;
    line-height: 2.25rem !important;
}

.text-2xl {
    font-size: 1.5rem !important;
    line-height: 2rem !important;
}

.text-xl {
    font-size: 1.25rem !important;
    line-height: 1.75rem !important;
}

.text-lg {
    font-size: 1.125rem !important;
    line-height: 1.5rem !important;
}

/* Controle específico para ícones */
.fas, .fab {
    font-size: 1rem !important;
}

.text-2xl.fas, .text-2xl.fab {
    font-size: 1.25rem !important;
}

.text-xl.fas, .text-xl.fab {
    font-size: 1.125rem !important;
}

/* Controle de botões */
button {
    font-size: 0.875rem !important;
    padding: 0.5rem 1rem !important;
}

button i {
    font-size: 0.875rem !important;
}

/* Controle específico para ícones em cards */
.w-16.h-16 {
    width: 3rem !important;
    height: 3rem !important;
}

.w-16.h-16 i {
    font-size: 1.125rem !important;
}

/* Media Queries para Mobile */
@media (max-width: 768px) {
    /* Reduzir tamanhos de fonte */
    .text-4xl {
        font-size: 2rem !important;
        line-height: 2.5rem !important;
    }
    
    .text-3xl {
        font-size: 1.75rem !important;
        line-height: 2.25rem !important;
    }
    
    .text-2xl {
        font-size: 1.5rem !important;
        line-height: 2rem !important;
    }
    
    .text-xl {
        font-size: 1.25rem !important;
        line-height: 1.75rem !important;
    }
    
    .text-lg {
        font-size: 1.125rem !important;
        line-height: 1.5rem !important;
    }
    
    /* Reduzir padding de seções */
    .py-20 {
        padding-top: 3rem !important;
        padding-bottom: 3rem !important;
    }
    
    .py-16 {
        padding-top: 2.5rem !important;
        padding-bottom: 2.5rem !important;
    }
    
    .py-12 {
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }
    
    /* Reduzir espaçamentos */
    .mb-16 {
        margin-bottom: 2.5rem !important;
    }
    
    .mb-12 {
        margin-bottom: 2rem !important;
    }
    
    .mb-8 {
        margin-bottom: 1.5rem !important;
    }
    
    /* Otimizar botões para mobile */
    .px-6 {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
    
    .py-4 {
        padding-top: 0.75rem !important;
        padding-bottom: 0.75rem !important;
    }
    
    .py-3 {
        padding-top: 0.5rem !important;
        padding-bottom: 0.5rem !important;
    }
    
    /* Reduzir tamanho de cards */
    .p-8 {
        padding: 1.5rem !important;
    }
    
    .p-6 {
        padding: 1rem !important;
    }
    
    /* Otimizar FAQ para mobile */
    .faq-header {
        padding: 16px 20px !important;
    }
    
    .faq-content.open {
        padding: 0 20px 20px 20px !important;
    }
    
    .faq-question {
        font-size: 1rem !important;
    }
    
    .faq-answer {
        font-size: 0.9rem !important;
    }
    
    /* Reduzir tamanho de ícones */
    .text-2xl {
        font-size: 1.25rem !important;
    }
    
    .text-xl {
        font-size: 1.125rem !important;
    }
    
    /* Otimizar formulário para mobile */
    .form-input {
        font-size: 16px !important; /* Previne zoom no iOS */
        padding: 12px 16px !important;
    }
    
    /* Reduzir tamanho de inputs */
    input[type="text"], 
    input[type="tel"], 
    textarea {
        font-size: 16px !important;
        padding: 12px 16px !important;
    }
    
    /* Otimizar botões do formulário */
    .btn-primary {
        font-size: 1rem !important;
        padding: 12px 24px !important;
    }
    
    /* Reduzir espaçamento entre elementos */
    .space-y-6 > * + * {
        margin-top: 1rem !important;
    }
    
    .space-y-4 > * + * {
        margin-top: 0.75rem !important;
    }
    
    /* Otimizar grid para mobile */
    .grid-cols-2 {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }
    
    .grid-cols-3 {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }
    
    /* Otimizar modal para mobile */
    .modal-content {
        margin: 1rem !important;
        max-height: calc(100vh - 2rem) !important;
        overflow-y: auto !important;
    }
    
    /* Otimizar cards de veículos para mobile */
    .vehicle-card {
        padding: 1rem !important;
    }
    
    .vehicle-card h3 {
        font-size: 1.125rem !important;
    }
    
    .vehicle-card p {
        font-size: 0.875rem !important;
    }
    
    /* Otimizar recibo para mobile */
    .receipt {
        margin: 1rem !important;
        font-size: 0.875rem !important;
    }
    
    .receipt-header h2 {
        font-size: 1.25rem !important;
    }
    
    /* Otimizar mapa para mobile */
    #map {
        height: 300px !important;
    }
    
    /* Otimizar navegação para mobile */
    .nav-mobile {
        padding: 1rem !important;
    }
    
    .nav-mobile a {
        padding: 0.75rem 1rem !important;
        font-size: 0.875rem !important;
    }
    
    /* Otimizar hero section para mobile */
    .hero-content {
        padding: 2rem 1rem !important;
    }
    
    .hero-title {
        font-size: 2rem !important;
        line-height: 2.5rem !important;
    }
    
    .hero-subtitle {
        font-size: 1.125rem !important;
        line-height: 1.5rem !important;
    }
    
    /* Otimizar seção de serviços para mobile */
    .service-card {
        padding: 1.5rem !important;
    }
    
    .service-icon {
        width: 2.5rem !important;
        height: 2.5rem !important;
    }
    
    .service-title {
        font-size: 1.125rem !important;
    }
    
    .service-description {
        font-size: 0.875rem !important;
    }
    
    /* Otimizar footer para mobile */
    .footer-content {
        padding: 2rem 1rem !important;
    }
    
    .footer-section {
        margin-bottom: 2rem !important;
    }
    
    .footer-title {
        font-size: 1.125rem !important;
    }
    
    .footer-link {
        font-size: 0.875rem !important;
        padding: 0.5rem 0 !important;
    }
}

/* Estilos adicionais para melhor UX */
.smooth-transition {
    transition: all 0.3s ease;
}

.hover-scale:hover {
    transform: scale(1.05);
}

.shadow-custom {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.shadow-custom-lg {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Estilos para loading states */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

.loading-dots::after {
    content: '';
    animation: dots 1.5s steps(5, end) infinite;
}

@keyframes dots {
    0%, 20% {
        color: rgba(0, 0, 0, 0);
        text-shadow: 0.25em 0 0 rgba(0, 0, 0, 0), 0.5em 0 0 rgba(0, 0, 0, 0);
    }
    40% {
        color: black;
        text-shadow: 0.25em 0 0 rgba(0, 0, 0, 0), 0.5em 0 0 rgba(0, 0, 0, 0);
    }
    60% {
        text-shadow: 0.25em 0 0 black, 0.5em 0 0 rgba(0, 0, 0, 0);
    }
    80%, 100% {
        text-shadow: 0.25em 0 0 black, 0.5em 0 0 black;
    }
}

/* Estilos para acessibilidade */
.focus-visible:focus {
    outline: 2px solid #f97316;
    outline-offset: 2px;
}

.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;
}

/* Hero animations for youthful feel */
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
    100% {
        transform: translateY(0px);
    }
}

.hero-bounce {
    animation: bounce 2s infinite;
}

.hero-pulse {
    animation: pulse 2s infinite;
}

.hero-float {
    animation: float 3s ease-in-out infinite;
}

.hero-image {
    transition: all 0.3s ease;
}

.hero-image:hover {
    transform: scale(1.05) rotate(2deg);
}

/* Enhanced youthful animations */
@keyframes slideInLeft {
    0% {
        opacity: 0;
        transform: translateX(-50px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    0% {
        opacity: 0;
        transform: translateX(50px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-slide-left {
    animation: slideInLeft 0.8s ease-out;
}

.animate-slide-right {
    animation: slideInRight 0.8s ease-out;
}

.animate-fade-up {
    animation: fadeInUp 0.6s ease-out;
}

/* Mobile optimizations for hero */
@media (max-width: 768px) {
    .hero-image {
        transform: none !important;
        padding: 0.5rem !important;
    }
    
    .hero-image:hover {
        transform: scale(1.02) !important;
    }
    
    #hero-title {
        text-align: center;
    }
    
    .order-1 {
        order: 1 !important;
    }
    
    .order-2 {
        order: 2 !important;
    }
    
    /* Increase image size on mobile */
    .hero-image img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important; /* Auto height to prevent cropping */
        object-fit: contain !important; /* Contain to show full image */
    }
}

/* Desktop optimizations */
@media (min-width: 1024px) {
    .hero-image img {
        max-width: 32rem !important; /* even larger on desktop */
        height: 31.25rem !important; /* 500px - consistent height */
        object-fit: contain !important;
    }
    
    .hero-image {
        padding: 1rem !important;
    }
}

/* Estilos para campos não preenchidos */
.field-empty {
    color: #9ca3af !important;
    font-style: italic;
    font-weight: normal !important;
}

.field-empty::before {
    content: "⚠️ ";
    margin-right: 4px;
}

/* Estilos para a nova fatura */
.invoice-table-header {
    font-weight: bold;
}

/* Estilos para números de contato na fatura */
.receipt-contact-number {
    font-family: 'Courier New', monospace;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.receipt-contact-mobile {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.2;
}

.receipt-contact-mobile div {
    font-family: 'Courier New', monospace;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.invoice-table-row {
    border-bottom: 1px solid #e5e7eb;
}

.flex-2 {
    flex: 2;
}

.flex-1 {
    flex: 1;
}

.packaging-card {
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid #e5e7eb;
    background: linear-gradient(135deg, #ffffff, #f9fafb);
}

.packaging-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 107, 53, 0.15);
    border-color: #FF6B35;
}

.packaging-card.selected {
    border-color: #FF6B35;
    background: linear-gradient(135deg, #fff7ed, #fed7aa);
    transform: translateY(-1px);
    box-shadow: 0 6px 15px rgba(255, 107, 53, 0.25);
}

/* Prevent body scroll when modal is open */
body.modal-open {
    overflow: hidden;
}

/* Error styles for form validation */
.error-border {
    border-color: #ef4444 !important;
    border-width: 2px !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1) !important;
}

/* Optimize modal for PDF capture */
#receiptModal {
    /* Ensure consistent rendering */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    /* Force hardware acceleration */
    transform: translateZ(0);
    /* Ensure all elements are visible */
    visibility: visible !important;
    opacity: 1 !important;
}

/* Ensure all text is crisp */
#receiptModal * {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* Force all backgrounds to render */
#receiptModal * {
    background-attachment: scroll !important;
}

/* Ensure gradients render properly */
#receiptModal .bg-gradient-to-br,
#receiptModal .bg-gradient-to-r {
    background-image: inherit !important;
}

/* Estilos para impressão */
@media print {
    .no-print {
        display: none !important;
    }
    
    .print-only {
        display: block !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
    
    .receipt {
        box-shadow: none;
        border: 1px solid #000;
    }
}