/**
 * BriskCar Custom Styles
 * Luxury Dark Theme with Gold Accents
 */

:root {
  --gold: #d4af37;
  --gold-dark: #b8941f;
  --gold-light: #f4e4bc;
  --black: #000000;
  --dark-gray: #1a1a1a;
  --gray: #333333;
  --light-gray: #666666;
  --white: #ffffff;
}

/* Custom Gold Color for Tailwind */
.gold {
  color: var(--gold);
}

.bg-gold {
  background-color: var(--gold);
}

.border-gold {
  border-color: var(--gold);
}

.text-gold {
  color: var(--gold);
}

.hover\:text-gold:hover {
  color: var(--gold);
}

.hover\:bg-gold:hover {
  background-color: var(--gold);
}

/* Smooth Scrolling */
html {
  scroll-behavior: smooth;
}

body {
  font-family:
    "Inter",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    "Helvetica Neue",
    Arial,
    sans-serif;
  background-color: var(--black);
  color: var(--white);
  line-height: 1.6;
}

/* Navbar Styles */
.nav-link {
  position: relative;
  transition: color 0.3s ease;
  font-weight: 500;
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(to right, var(--gold), var(--gold-light));
  transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.text-gold::after {
  width: 100%;
}

/* Hero Section */
.hero-gradient {
  background: linear-gradient(
    135deg,
    rgba(0, 0, 0, 0.9) 0%,
    rgba(26, 26, 26, 0.8) 100%
  );
}

/* Booking Form */
.booking-form {
  background: rgba(26, 26, 26, 0.95);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(212, 175, 55, 0.2);
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.5),
    0 0 40px rgba(212, 175, 55, 0.1);
}

.form-input {
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(212, 175, 55, 0.3);
  color: var(--white);
  transition: all 0.3s ease;
}

.form-input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
  background: rgba(0, 0, 0, 0.7);
}

.form-input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.form-select {
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(212, 175, 55, 0.3);
  color: var(--white);
  transition: all 0.3s ease;
}

.form-select:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
  background: rgba(0, 0, 0, 0.7);
}

.form-textarea {
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(212, 175, 55, 0.3);
  color: var(--white);
  transition: all 0.3s ease;
  resize: vertical;
}

.form-textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
  background: rgba(0, 0, 0, 0.7);
}

/* Buttons */
.btn-gold {
  background: linear-gradient(135deg, var(--gold) 0%, #f4d03f 100%);
  color: var(--black);
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
}

.btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(212, 175, 55, 0.5);
}

.btn-gold:active {
  transform: translateY(0);
}

.btn-outline-gold {
  border: 2px solid var(--gold);
  color: var(--gold);
  background: transparent;
  transition: all 0.3s ease;
}

.btn-outline-gold:hover {
  background: var(--gold);
  color: var(--black);
}

/* Cards */
.luxury-card {
  background: rgba(26, 26, 26, 0.8);
  border: 1px solid rgba(212, 175, 55, 0.2);
  transition: all 0.3s ease;
  width: 80% !important;
}

.luxury-card:hover {
  transform: translateY(-5px);
  border-color: var(--gold);
  box-shadow: 0 10px 30px rgba(212, 175, 55, 0.2);
}

/* Loading Spinner */
.spinner {
  border: 3px solid rgba(212, 175, 55, 0.3);
  border-top: 3px solid var(--gold);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Error Messages */
.error-message {
  background: rgba(220, 38, 38, 0.1);
  border: 1px solid rgba(220, 38, 38, 0.5);
  color: #fca5a5;
  padding: 12px;
  border-radius: 8px;
  margin-top: 8px;
}

/* Success Messages */
.success-message {
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.5);
  color: #86efac;
  padding: 12px;
  border-radius: 8px;
  margin-top: 8px;
}

/* Info Messages */
.info-message {
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.5);
  color: #93c5fd;
  padding: 12px;
  border-radius: 8px;
  margin-top: 8px;
}

/* Autocomplete Dropdown */
.autocomplete-dropdown {
  position: absolute;
  z-index: 1000;
  background: rgba(26, 26, 26, 0.98);
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-top: none;
  max-height: 200px;
  overflow-y: auto;
  width: 100%;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.autocomplete-item {
  padding: 12px;
  cursor: pointer;
  border-bottom: 1px solid rgba(212, 175, 55, 0.1);
  transition: background 0.2s ease;
}

.autocomplete-item:hover,
.autocomplete-item.selected {
  background: rgba(212, 175, 55, 0.1);
}

.autocomplete-item:last-child {
  border-bottom: none;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: var(--dark-gray);
}

::-webkit-scrollbar-thumb {
  background: var(--gold);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--gold-dark);
}

/* Responsive Typography */
@media (max-width: 768px) {
  .hero-title {
    font-size: 2rem;
    line-height: 1.2;
    margin-bottom: 1rem;
  }

  .hero-subtitle {
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 1.5rem;
  }

  /* Reduce hero section padding on mobile */
  .hero-gradient {
    min-height: auto;
    padding-top: 4rem;
    padding-bottom: 2rem;
  }
}

/* Animation */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 0.6s ease-out;
}

/* Print Styles for Invoice */
@media print {
  body {
    background: white;
    color: black;
  }

  .no-print {
    display: none;
  }
}

/* Map Styles */
#mainTripMap {
  width: 100%;
  height: 400px;
  border-radius: 0.5rem;
  border: 1px solid rgba(212, 175, 55, 0.3);
  z-index: 1;
  background: #1a1a1a;
}

#returnTripMap {
    width: 100%;
    height: 400px;
    border-radius: 0.5rem;
    border: 1px solid rgba(212, 175, 55, 0.3);
    z-index: 1;
    background: #1a1a1a;
}

/* Force light UI controls for all inputs on dark background */
/* color-scheme removed to allow manual overrides */

/* Fallback for Webkit Date/Time Pickers: Ensure correct coloring */
/* Fallback for Webkit Date/Time Pickers: Ensure correct coloring */
/* Force browser to treat input as dark-themed, which natively renders white icons */
input[type="date"],
input[type="time"] {
    color-scheme: dark;
}

input[type="date"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator {
    filter: invert(1) !important;
    background-image: none !important;
    opacity: 1 !important;
    cursor: pointer;
}

/* Number Input Spinners: */
input[type="number"]::-webkit-inner-spin-button, 
input[type="number"]::-webkit-outer-spin-button { 
    opacity: 1;
    cursor: pointer;
}
