/* Car Booking Rental System - Frontend Styles */

:root {
  --background: #0a0a0b;
  --foreground: #fafafa;
  --card: #141416;
  --card-foreground: #fafafa;
  --primary: #f97316;
  --primary-foreground: #ffffff;
  --secondary: #1c1c1f;
  --secondary-foreground: #fafafa;
  --muted: #27272a;
  --muted-foreground: #a1a1aa;
  --border: #27272a;
  --accent: #f97316;
}

.car-booking-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Text Gradient */
.text-gradient {
  background: linear-gradient(135deg, var(--primary) 0%, #fb923c 50%, #fdba74 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
  font-family: inherit;
  font-size: inherit;
}

.btn-hero {
  background: linear-gradient(135deg, var(--primary) 0%, #ea580c 100%);
  color: var(--primary-foreground);
  box-shadow: 0 0 20px rgba(249, 115, 22, 0.3);
}

.btn-hero:hover {
  box-shadow: 0 0 30px rgba(249, 115, 22, 0.5);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--primary);
  color: var(--primary);
}

.btn-outline:hover {
  background: var(--primary);
  color: var(--primary-foreground);
}

.btn-secondary {
  background: var(--secondary);
  color: var(--foreground);
}

.btn-secondary:hover {
  background: var(--muted);
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

.btn-lg {
  padding: 1rem 2rem;
  font-size: 1.125rem;
}

/* Filter Buttons */
.filter-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 2.5rem;
}

.filter-buttons .btn.active {
  box-shadow: 0 0 30px rgba(249, 115, 22, 0.5);
}

/* Cars Grid */
.cars-grid {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 640px) {
  .cars-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .cars-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1280px) {
  .cars-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.car-card {
  background: linear-gradient(135deg, var(--card) 0%, rgba(20, 20, 22, 0.8) 100%);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  overflow: hidden;
  transition: border-color 0.3s;
}

.car-card:hover {
  border-color: rgba(249, 115, 22, 0.5);
}

.car-image {
  position: relative;
  aspect-ratio: 16/10;
  background: var(--secondary);
  overflow: hidden;
}

.car-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}

.car-card:hover .car-image img {
  transform: scale(1.05);
}

.car-badge {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 500;
  background: rgba(249, 115, 22, 0.9);
  color: white;
  border-radius: 9999px;
}

.car-content {
  padding: 1.25rem;
}

.car-brand {
  font-size: 0.875rem;
  color: var(--primary);
  font-weight: 500;
}

.car-model {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--foreground);
}

.car-specs {
  display: flex;
  gap: 1rem;
  font-size: 0.875rem;
  color: var(--muted-foreground);
  margin-bottom: 1.25rem;
}

.car-specs span {
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.car-specs svg {
  width: 1rem;
  height: 1rem;
}

.car-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.car-price {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--foreground);
}

.car-price span {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  font-weight: 400;
}

/* Modal Styles */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.modal.active {
  opacity: 1;
  visibility: visible;
}

.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(4px);
}

.modal-content {
  position: relative;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 1.5rem;
  width: 90%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.modal.active .modal-content {
  transform: scale(1);
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  color: var(--muted-foreground);
  cursor: pointer;
  padding: 0.25rem;
  transition: color 0.3s;
}

.modal-close:hover {
  color: var(--foreground);
}

.modal-content h2 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
  padding-right: 2rem;
  color: var(--foreground);
}

.modal-car-info {
  display: flex;
  gap: 1rem;
  padding: 1rem;
  background: rgba(28, 28, 31, 0.5);
  border-radius: 0.5rem;
  margin-bottom: 1.25rem;
}

.modal-car-info img {
  width: 6rem;
  height: 4rem;
  object-fit: cover;
  border-radius: 0.375rem;
}

.modal-car-title {
  font-weight: 600;
  color: var(--foreground);
  margin: 0;
}

.modal-car-specs {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  margin: 0.25rem 0;
}

.modal-car-price {
  color: var(--primary);
  font-weight: 700;
  margin: 0;
}

.modal-content form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

.form-row {
  display: grid;
  gap: 1rem;
}

@media (min-width: 640px) {
  .form-row {
    grid-template-columns: repeat(2, 1fr);
  }
}

.form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  background: rgba(10, 10, 11, 0.5);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  color: var(--foreground);
  font-size: 1rem;
  font-family: inherit;
}

.form-input::placeholder {
  color: var(--muted-foreground);
}

.form-input:focus {
  outline: none;
  border-color: var(--primary);
}

.price-calculation {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  background: rgba(249, 115, 22, 0.1);
  border: 1px solid rgba(249, 115, 22, 0.2);
  border-radius: 0.5rem;
}

.price-calculation span:first-child {
  color: var(--muted-foreground);
}

.total-price {
  font-size: 1.5rem;
  font-weight: 700;
}

.modal-buttons {
  display: flex;
  gap: 0.75rem;
  padding-top: 0.5rem;
}

.modal-buttons .btn {
  flex: 1;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

/* Utility Classes */
.hidden {
  display: none;
}

@media (min-width: 768px) {
  .md\:flex {
    display: flex;
  }
  .md\:hidden {
    display: none;
  }
}

/* Responsive adjustments */
@media (max-width: 767px) {
  .car-model {
    font-size: 1.125rem;
  }
  
  .car-price {
    font-size: 1.25rem;
  }
  
  .modal-content {
    width: 95%;
    padding: 1rem;
  }
  
  .modal-buttons {
    flex-direction: column;
  }
}
