/* Custom CSS for Taxi Trento */

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #1a1a2e;
}

::-webkit-scrollbar-thumb {
    background: #FFD700;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #E6C200;
}

/* Autocomplete dropdown scrollbar */
.autocomplete-dropdown::-webkit-scrollbar {
    width: 6px;
}

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

.autocomplete-dropdown::-webkit-scrollbar-thumb {
    background: #FFD700;
    border-radius: 3px;
}

/* Navigation styles - using regular CSS for CDN compatibility */
.nav-link {
    padding: 8px 16px;
    border-radius: 8px;
    color: #d1d5db;
    font-weight: 500;
    transition: all 0.2s;
    text-decoration: none;
}

.nav-link:hover {
    color: white;
    background-color: rgba(255, 255, 255, 0.1);
}

.nav-link.active {
    color: #FFD700;
    background-color: rgba(255, 215, 0, 0.1);
}

#navbar {
    background: transparent;
}

#navbar.scrolled {
    background-color: rgba(26, 26, 46, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Button styles - using regular CSS for CDN compatibility */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: #FFD700;
    color: #0f0f23;
    font-weight: 600;
    padding: 12px 24px;
    border-radius: 12px;
    transition: all 0.2s;
    box-shadow: 0 10px 15px -3px rgba(255, 215, 0, 0.25);
    text-decoration: none;
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    background-color: #E6C200;
    transform: scale(1.05);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: white;
    font-weight: 600;
    padding: 12px 24px;
    border-radius: 12px;
    transition: all 0.2s;
    text-decoration: none;
    background: transparent;
    cursor: pointer;
}

.btn-secondary:hover {
    border-color: #FFD700;
    color: #FFD700;
}

/* Input styles - using regular CSS for CDN compatibility */
.input-field {
    width: 100%;
    background-color: rgba(15, 15, 35, 0.7) !important;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 12px 16px;
    color: white !important;
    font-size: 14px;
    transition: all 0.2s;
}

.input-field::placeholder {
    color: #6b7280;
}

.input-field:focus {
    outline: none;
    border-color: #FFD700;
    box-shadow: 0 0 0 1px #FFD700;
}

/* Ensure ALL form inputs have visible text */
input.input-field,
textarea.input-field,
select.input-field,
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="date"],
input[type="time"],
textarea,
select {
    color: white !important;
    background-color: rgba(15, 15, 35, 0.7) !important;
}

/* Select dropdown styling */
select.input-field {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23FFD700' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 40px;
}

select.input-field option {
    background-color: #1a1a2e;
    color: white;
}

/* Date and time input fixes - dark theme */
input[type="date"],
input[type="time"] {
    color: white !important;
    color-scheme: dark;
    cursor: pointer;
    position: relative;
}

/* Make the entire input clickable for date/time picker */
input[type="date"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: auto;
    height: auto;
    color: transparent;
    background: transparent;
    cursor: pointer;
    opacity: 0;
}

/* Custom icon styling handled by Lucide icons in HTML */

/* Map Modal Styles */
.map-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.map-modal.active {
    display: flex;
}

.map-modal-content {
    background: #1a1a2e;
    border-radius: 20px;
    width: 100%;
    max-width: 800px;
    max-height: 90vh;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
}

.map-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.map-modal-header h3 {
    color: white;
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

.map-modal-close {
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.2s;
}

.map-modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.map-search-container {
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.map-search-input {
    width: 100%;
    padding: 12px 16px;
    background: rgba(15, 15, 35, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: white;
    font-size: 14px;
}

.map-search-input::placeholder {
    color: #666;
}

.map-search-input:focus {
    outline: none;
    border-color: #FFD700;
}

#map-container {
    height: 400px;
    width: 100%;
}

.map-modal-footer {
    padding: 16px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.selected-address {
    flex: 1;
    color: #999;
    font-size: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.selected-address.has-address {
    color: white;
}

.map-confirm-btn {
    background: #FFD700;
    color: #1a1a2e;
    border: none;
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.map-confirm-btn:hover {
    background: #E6C200;
}

.map-confirm-btn:disabled {
    background: #444;
    color: #888;
    cursor: not-allowed;
}

/* Leaflet custom styling */
.leaflet-container {
    background: #1a1a2e;
}

.leaflet-control-zoom a {
    background: #1a1a2e !important;
    color: white !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
}

.leaflet-control-zoom a:hover {
    background: #2a2a4e !important;
}

/* Address input with map button */
.address-input-wrapper {
    position: relative;
}

.map-trigger-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 215, 0, 0.2);
    border: none;
    padding: 6px 10px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    color: #FFD700;
    font-size: 12px;
    transition: all 0.2s;
}

.map-trigger-btn:hover {
    background: rgba(255, 215, 0, 0.3);
}

.map-trigger-btn svg {
    width: 14px;
    height: 14px;
}

/* Service card styles - using regular CSS for CDN compatibility */
.service-card {
    background-color: rgba(15, 15, 35, 0.5);
    padding: 32px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s;
}

.service-card:hover {
    border-color: rgba(255, 215, 0, 0.3);
    transform: translateY(-8px);
}

.service-icon {
    width: 64px;
    height: 64px;
    background-color: rgba(255, 215, 0, 0.2);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FFD700;
    margin-bottom: 24px;
    transition: all 0.3s;
}

/* Route card styles - using regular CSS for CDN compatibility */
.route-card {
    background-color: rgba(15, 15, 35, 0.5);
    padding: 24px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s;
}

.route-card:hover {
    border-color: rgba(255, 215, 0, 0.3);
}

/* Animation classes */
.animate-float {
    animation: float 6s ease-in-out infinite;
}

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

.animate-pulse-slow {
    animation: pulse 4s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Gradient text */
.gradient-text {
    background: linear-gradient(to right, #FFD700, #fde047, #FFD700);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* Glass effect */
.glass {
    background-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Selection color */
::selection {
    background: #FFD700;
    color: #1a1a2e;
}

/* Loading animation */
.loader {
    width: 48px;
    height: 48px;
    border: 5px solid #1a1a2e;
    border-bottom-color: #FFD700;
    border-radius: 50%;
    display: inline-block;
    animation: rotation 1s linear infinite;
}

@keyframes rotation {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Mobile menu animation */
#mobileMenu {
    transition: all 0.3s ease-in-out;
}

#mobileMenu.open {
    display: block;
}

/* Tariff table styles */
.tariff-table {
    width: 100%;
    border-collapse: collapse;
}

.tariff-table th {
    background-color: rgba(255, 215, 0, 0.2);
    color: #FFD700;
    font-weight: 600;
    padding: 12px 16px;
    text-align: left;
}

.tariff-table td {
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.tariff-table tr:hover td {
    background-color: rgba(255, 255, 255, 0.05);
}

/* FAQ Accordion */
.faq-item {
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 16px;
}

.faq-question {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    background-color: rgba(15, 15, 35, 0.5);
    transition: all 0.2s;
    cursor: pointer;
    border: none;
    color: inherit;
    font: inherit;
    text-align: left;
}

.faq-question:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.faq-answer {
    padding: 20px;
    background-color: rgba(26, 26, 46, 0.5);
    display: none;
}

.faq-item.active .faq-answer {
    display: block;
}

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

/* Driver portal styles */
.portal-card {
    background-color: rgba(26, 26, 46, 0.8);
    backdrop-filter: blur(24px);
    border-radius: 16px;
    padding: 32px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-card {
    background-color: rgba(15, 15, 35, 0.5);
    border-radius: 12px;
    padding: 24px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Map placeholder */
.map-container {
    background-color: rgba(15, 15, 35, 0.5);
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    min-height: 400px;
}

.map-container::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom right, rgba(255, 215, 0, 0.1), transparent);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .btn-primary, .btn-secondary {
        width: 100%;
        justify-content: center;
    }
}

/* Print styles */
@media print {
    nav, footer, .btn-primary, .btn-secondary, .whatsapp-float {
        display: none !important;
    }

    body {
        background: white !important;
        color: black !important;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus styles for accessibility */
a:focus-visible, button:focus-visible, input:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px #0f0f23, 0 0 0 4px #FFD700;
}

/* WhatsApp floating button */
.whatsapp-float {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 50;
    width: 64px;
    height: 64px;
    background-color: #22c55e;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(34, 197, 94, 0.4);
    transition: all 0.3s;
    text-decoration: none;
}

.whatsapp-float:hover {
    background-color: #16a34a;
    transform: scale(1.1);
}

.whatsapp-float svg {
    width: 32px;
    height: 32px;
    fill: white;
}

/* Tooltip */
.tooltip {
    position: relative;
}

.tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 8px;
    padding: 4px 12px;
    background-color: #0f0f23;
    color: white;
    font-size: 14px;
    border-radius: 8px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s;
    white-space: nowrap;
}

.tooltip:hover::after {
    opacity: 1;
    visibility: visible;
}

/* Badge styles */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 9999px;
    font-size: 12px;
    font-weight: 500;
}

.badge-primary {
    background-color: rgba(255, 215, 0, 0.2);
    color: #FFD700;
}

.badge-success {
    background-color: rgba(34, 197, 94, 0.2);
    color: #4ade80;
}

.badge-warning {
    background-color: rgba(234, 179, 8, 0.2);
    color: #facc15;
}

/* Timeline for driver history */
.timeline-item {
    position: relative;
    padding-left: 32px;
    padding-bottom: 32px;
    border-left: 2px solid rgba(255, 255, 255, 0.1);
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-dot {
    position: absolute;
    left: 0;
    top: 0;
    width: 16px;
    height: 16px;
    transform: translateX(-50%);
    border-radius: 50%;
    background-color: #FFD700;
}
