/* =====================================================
   CAMINHA BRASIL - Estilos Customizados
   Complementar ao Tailwind CSS
   ===================================================== */

/* Animação de fade-in para elementos */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 5px rgba(34, 197, 94, 0.4);
    }
    50% {
        box-shadow: 0 0 20px rgba(34, 197, 94, 0.8);
    }
}

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

/* Classe utilitárias de animação */
.animate-fade-in-up {
    animation: fadeInUp 0.6s ease-out forwards;
}

.animate-fade-in {
    animation: fadeIn 0.4s ease-out forwards;
}

.animate-slide-in-right {
    animation: slideInRight 0.5s ease-out forwards;
}

.animate-pulse-glow {
    animation: pulse-glow 2s ease-in-out infinite;
}

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

/* Delay de animação */
.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; }
.delay-500 { animation-delay: 0.5s; }

/* Gradiente de fundo para hero */
.hero-gradient {
    background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 50%, #0f172a 100%);
    position: relative;
    overflow: hidden;
}

.hero-gradient::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 60%;
    height: 200%;
    background: radial-gradient(circle, rgba(34, 197, 94, 0.15) 0%, transparent 70%);
    pointer-events: none;
}

.hero-gradient::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 40%;
    height: 150%;
    background: radial-gradient(circle, rgba(34, 197, 94, 0.1) 0%, transparent 60%);
    pointer-events: none;
}

/* Card com hover elevação */
.card-hover {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

/* Botão com efeito de ripple */
.btn-ripple {
    position: relative;
    overflow: hidden;
}

.btn-ripple::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-ripple:active::after {
    width: 300px;
    height: 300px;
}

/* Mapa Google Maps */
#map {
    width: 100%;
    height: 100%;
    min-height: 400px;
    border-radius: 12px;
}

/* Scrollbar customizada para painéis */
.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: transparent;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: rgba(156, 163, 175, 0.4);
    border-radius: 3px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: rgba(156, 163, 175, 0.6);
}

/* Status indicator pulsante (motorista online) */
.status-online {
    position: relative;
}

.status-online::after {
    content: '';
    position: absolute;
    top: -2px;
    right: -2px;
    width: 12px;
    height: 12px;
    background: #22c55e;
    border-radius: 50%;
    border: 2px solid currentColor;
    animation: pulse-glow 2s infinite;
}

/* Card de corrida pendente */
.ride-card {
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
}

.ride-card:hover {
    border-left-color: #22c55e;
    background: rgba(34, 197, 94, 0.05);
}

/* Toast de notificação */
.toast {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 9999;
    animation: slideInRight 0.4s ease-out;
}

/* Input focus ring personalizado */
input:focus, select:focus, textarea:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2);
    border-color: #22c55e;
}

/* Loading spinner */
.spinner {
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid #fff;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    animation: spin 0.8s linear infinite;
}

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

/* Responsividade do mapa no painel do passageiro */
@media (max-width: 768px) {
    .painel-passageiro {
        flex-direction: column;
    }

    .painel-passageiro .mapa-container {
        height: 50vh;
        width: 100%;
    }

    .painel-passageiro .form-container {
        width: 100%;
    }
}

@media (min-width: 769px) {
    .painel-passageiro .mapa-container {
        width: 60%;
        height: calc(100vh - 64px);
    }

    .painel-passageiro .form-container {
        width: 40%;
    }
}
