/* BM CARRENTAL CHIANG RAI - Custom Styles */

body {
  font-family: "Kanit", sans-serif;
  background: #0a0a0a;
  color: #ffffff;
}

/* Hero Section Background - ใช้พื้นหลังสีดำสนิทตามที่ต้องการ หรือภาพรถ */
.hero-section-bg {
  background-color: #0a0a0a; /* Black background fallback */
  position: relative;
}

/* Ensure content is above background */
.hero-section-bg .container {
  position: relative;
  z-index: 10;
}

.car-card {
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  background: linear-gradient(145deg, #1a1a1a, #2a2a2a);
  border: 1px solid #333;
  overflow: hidden;
}
.car-card:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: 0 20px 40px rgba(234, 179, 8, 0.2);
  border-color: #eab308; /* Tailwind Amber-500 */
}

/* --- ปุ่มหลัก (Primary Button) --- */
.btn-primary {
  background: linear-gradient(
    135deg,
    #eab308,
    #d97706
  ); /* Amber-500 to Amber-600 */
  color: #1a1a1a;
  transition: all 0.3s ease;
  font-weight: 600;
  border: none;
}
.btn-primary:hover {
  background: linear-gradient(135deg, #d97706, #eab308);
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(234, 179, 8, 0.4);
}

/* --- ปุ่มรอง (Outline) --- */
.btn-outline {
  border: 2px solid #c80000; /* Red border */
  color: #c80000; /* Red text */
  transition: all 0.3s ease;
  font-weight: 600;
}
.btn-outline:hover {
  background: #c80000;
  color: white;
  transform: translateY(-2px);
}

.nav-gradient {
  background: linear-gradient(
    135deg,
    rgba(10, 10, 10, 0.95) 0%,
    rgba(20, 20, 20, 0.98) 100%
  );
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

/* Remove all backdrop-blur effects */
*,
*::before,
*::after {
  --tw-backdrop-blur: none !important;
  --tw-backdrop-brightness: none !important;
  --tw-backdrop-contrast: none !important;
  --tw-backdrop-grayscale: none !important;
  --tw-backdrop-hue-rotate: none !important;
  --tw-backdrop-invert: none !important;
  --tw-backdrop-opacity: none !important;
  --tw-backdrop-saturate: none !important;
  --tw-backdrop-sepia: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

/* Specifically target Tailwind backdrop-blur classes */
.backdrop-blur-sm,
.backdrop-blur,
.backdrop-blur-md,
.backdrop-blur-lg,
.backdrop-blur-xl,
.backdrop-blur-2xl,
.backdrop-blur-3xl {
  --tw-backdrop-blur: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
.section-title {
  position: relative;
  display: inline-block;
}
.section-title:after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 60px;
  height: 3px;
  background: linear-gradient(135deg, #eab308, #d97706);
}
.feature-icon {
  background: linear-gradient(135deg, #eab308, #d97706);
  border-radius: 50%;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 15px;
}
.language-dropdown {
  position: relative;
}

.language-dropdown-content {
  display: none;
  position: absolute;
  background: #1a1a1a;
  min-width: 120px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
  z-index: 1000;
  border-radius: 8px;
  overflow: visible;
  right: 0;
  border: 1px solid #374151;
  top: calc(100% + 0.25rem);
  margin-top: 0;
  padding-top: 0.25rem;
}

.language-dropdown-content::before {
  content: "";
  position: absolute;
  top: -0.5rem;
  left: 0;
  right: 0;
  height: 0.5rem;
  background: transparent;
}

.language-dropdown-content a {
  color: #d1d5db;
  padding: 10px 15px;
  text-decoration: none;
  display: flex;
  align-items: center;
  transition: all 0.3s ease;
  border-bottom: 1px solid #374151;
  position: relative;
  z-index: 1;
}
.language-dropdown-content a:last-child {
  border-bottom: none;
}
.language-dropdown-content a:hover {
  background: #eab308;
  color: #1a1a1a;
  transform: translateX(5px);
}
.language-dropdown:hover .language-dropdown-content,
.language-dropdown-content:hover {
  display: block;
}

/* Show dropdown when it has the 'show' class (for JavaScript control) */
.language-dropdown-content.show {
  display: block !important;
}

/* Account Dropdown Styles */
.account-dropdown {
  position: relative;
}

.account-dropdown-content {
  display: none;
  position: absolute;
  background: #1a1a1a;
  min-width: 220px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
  z-index: 1000;
  border-radius: 8px;
  overflow: visible;
  right: 0;
  border: 1px solid #374151;
  top: calc(100% + 0.25rem);
  margin-top: 0;
  padding-top: 0.25rem;
}

.account-dropdown-content::before {
  content: "";
  position: absolute;
  top: -0.5rem;
  left: 0;
  right: 0;
  height: 0.5rem;
  background: transparent;
}

.account-dropdown-content a {
  color: #d1d5db;
  padding: 12px 15px;
  text-decoration: none;
  display: flex;
  align-items: center;
  transition: all 0.3s ease;
  border-bottom: 1px solid #374151;
  position: relative;
  z-index: 1;
}

.account-dropdown-content a:last-child {
  border-bottom: none;
}

.account-dropdown-content a:hover {
  background: #eab308;
  color: #1a1a1a;
  transform: translateX(5px);
}

.account-dropdown-content a:hover i {
  color: #1a1a1a;
}

.account-dropdown-content .border-t {
  border-top: 1px solid #374151;
  margin: 0.5rem 0;
}

.account-dropdown:hover .account-dropdown-content,
.account-dropdown-content:hover {
  display: block;
}

/* Service Dropdown Styles */
.service-dropdown {
  position: relative;
}

.service-dropdown-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  font-size: inherit;
  font-family: inherit;
  outline: none;
}

.service-dropdown-btn:focus {
  outline: none;
}

.service-dropdown-content {
  display: none;
  position: absolute;
  background: #1a1a1a;
  min-width: 200px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
  z-index: 1000;
  border-radius: 8px;
  overflow: visible;
  left: 0;
  border: 1px solid #374151;
  top: calc(100% + 0.25rem);
  margin-top: 0;
  padding-top: 0.25rem;
  padding-bottom: 0.25rem;
  animation: fadeInDown 0.3s ease-out;
  visibility: hidden;
  opacity: 0;
  transition:
    opacity 0.3s ease,
    visibility 0.3s ease;
  pointer-events: none;
}

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

.service-dropdown-content::before {
  content: "";
  position: absolute;
  top: -0.5rem;
  left: 0;
  right: 0;
  height: 0.5rem;
  background: transparent;
}

.service-dropdown-content a {
  color: #d1d5db;
  padding: 12px 15px;
  text-decoration: none;
  display: flex;
  align-items: center;
  transition: all 0.3s ease;
  border-bottom: 1px solid #374151;
  position: relative;
  z-index: 1;
}

.service-dropdown-content a:last-child {
  border-bottom: none;
}

.service-dropdown-content a:hover {
  background: #eab308;
  color: #1a1a1a;
  transform: translateX(5px);
}

.service-dropdown-content a:hover i {
  color: #1a1a1a;
}

.service-dropdown.active .service-dropdown-content {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

.service-dropdown.active .service-dropdown-icon {
  transform: rotate(180deg);
}

/* Ensure dropdown is visible when active */
.service-dropdown.active {
  z-index: 1001;
}

/* Mobile Service Dropdown Styles */
.mobile-service-dropdown-btn {
  background: none;
  border: none;
  cursor: pointer;
  width: 100%;
  text-align: left;
}

.mobile-service-dropdown-content {
  max-height: 0;
  overflow: hidden;
  transition:
    max-height 0.3s ease-out,
    opacity 0.3s ease-out;
  opacity: 0;
}

.mobile-service-dropdown.active .mobile-service-dropdown-content {
  max-height: 500px;
  opacity: 1;
  transition:
    max-height 0.3s ease-in,
    opacity 0.3s ease-in;
  display: block !important;
}

.mobile-service-dropdown.active .mobile-service-dropdown-btn i.fa-chevron-down {
  transform: rotate(180deg);
}

/* --- Contact Badge --- */
.contact-badge {
  background: rgba(234, 179, 8, 0.2);
  border: 1px solid #eab308;
  border-radius: 20px;
  padding: 8px 15px;
  margin: 0 5px;
  transition: all 0.3s;
}
.contact-badge:hover {
  background: #eab308;
  color: #1a1a1a;
  transform: translateY(-2px);
}
.contact-badge:hover i {
  color: #1a1a1a;
}

/* --- Gradient Text --- */
.starting-price {
  background: linear-gradient(135deg, #fde047, #eab308);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 800;
}
.stats-number {
  font-size: 2.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, #fde047, #eab308);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* --- สไตล์สำหรับ Form Input ใน Hero --- */
.hero-form-input {
  background-color: #1f2937; /* bg-gray-800 */
  border: 1px solid #374151; /* border-gray-700 */
  color: #ffffff;
  border-radius: 0.5rem; /* rounded-lg */
  padding: 0.75rem; /* p-3 */
  width: 100%;
  transition: all 0.3s;
}
.hero-form-input:focus,
.hero-form-select:focus {
  border-color: #eab308; /* focus:border-amber-500 */
  box-shadow: 0 0 0 2px rgba(234, 179, 8, 0.5); /* Ring effect */
  outline: none;
}

/* Search Form Card Styles */
.search-form-card {
  animation: fadeInUp 0.6s ease-out;
  transition: all 0.3s ease;
}

.search-form-card:hover {
  border-color: rgba(234, 179, 8, 0.3);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
}

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

/* Custom Dropdown Styles */
.custom-dropdown-wrapper {
  position: relative;
  z-index: 10;
}

.custom-dropdown-btn {
  background-color: #1f2937;
  border: 1px solid #374151;
  border-radius: 0.75rem;
  padding: 0.875rem 1rem;
  width: 100%;
  font-size: 1rem;
  transition: all 0.3s ease;
  cursor: pointer;
  text-align: left;
  position: relative;
  z-index: 2;
}

.custom-dropdown-btn:hover {
  border-color: #4b5563;
  background-color: #252f3f;
}

.custom-dropdown-btn:focus {
  border-color: #eab308;
  box-shadow: 0 0 0 3px rgba(234, 179, 8, 0.2);
  outline: none;
}

.custom-dropdown-wrapper.active .custom-dropdown-btn {
  border-color: #eab308;
  box-shadow: 0 0 0 3px rgba(234, 179, 8, 0.2);
}

.custom-dropdown-wrapper.active .custom-dropdown-icon {
  transform: rotate(180deg);
}

/* Custom Dropdown Menu */
.custom-dropdown-menu {
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 0;
  right: 0;
  background: linear-gradient(135deg, #1a1a1a, #252525);
  border: 1px solid #374151;
  border-radius: 0.75rem;
  box-shadow:
    0 10px 40px rgba(0, 0, 0, 0.8),
    0 0 20px rgba(234, 179, 8, 0.1);
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1001;
  max-height: 0;
  overflow-y: auto;
}

/* Ensure dropdown is above date picker modal when both are active */
.custom-dropdown-wrapper.active {
  z-index: 10002;
}

.custom-dropdown-wrapper.active .custom-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  max-height: 300px;
  z-index: 10003;
}

/* Custom Dropdown Options */
.custom-dropdown-option {
  padding: 0.875rem 1rem;
  color: #ffffff;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  border-bottom: 1px solid rgba(55, 65, 81, 0.5);
  position: relative;
  overflow: hidden;
}

.custom-dropdown-option:last-child {
  border-bottom: none;
}

.custom-dropdown-option::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0;
  background: linear-gradient(90deg, rgba(234, 179, 8, 0.2), transparent);
  transition: width 0.3s ease;
}

.custom-dropdown-option:hover {
  background: linear-gradient(
    90deg,
    rgba(234, 179, 8, 0.15),
    rgba(234, 179, 8, 0.05)
  );
  color: #ffffff;
  transform: translateX(5px);
  padding-left: 1.25rem;
}

.custom-dropdown-option:hover::before {
  width: 4px;
}

.custom-dropdown-option.selected {
  background: linear-gradient(
    135deg,
    rgba(234, 179, 8, 0.2),
    rgba(234, 179, 8, 0.1)
  );
  color: #fbbf24;
  font-weight: 600;
}

.custom-dropdown-option.selected::after {
  content: "✓";
  position: absolute;
  right: 1rem;
  color: #eab308;
  font-weight: bold;
}

/* Popular Option Styling */
.custom-dropdown-option.popular-option {
  background: linear-gradient(
    135deg,
    rgba(234, 179, 8, 0.1),
    rgba(234, 179, 8, 0.05)
  );
  border-left: 3px solid #eab308;
}

.custom-dropdown-option.popular-option:hover {
  background: linear-gradient(
    135deg,
    rgba(234, 179, 8, 0.25),
    rgba(234, 179, 8, 0.15)
  );
}

/* Popular Badge Inline */
.popular-badge-inline {
  animation: pulse 2s infinite;
  box-shadow: 0 0 10px rgba(234, 179, 8, 0.5);
  white-space: nowrap;
}

.popular-badge-selected {
  animation: pulse 2s infinite;
  box-shadow: 0 0 10px rgba(234, 179, 8, 0.5);
}

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

/* Search Date Input - Enhanced */
.search-date-input {
  color-scheme: dark;
  cursor: pointer;
  background: linear-gradient(135deg, #1f2937, #252f3f);
  border: 2px solid #374151;
  border-radius: 0.875rem;
  padding: 1rem 3.5rem 1rem 1rem;
  width: 100%;
  font-size: 1rem;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  z-index: 1;
  color: transparent;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.search-date-input:hover {
  border-color: #eab308;
  background: linear-gradient(135deg, #252f3f, #2a3441);
  box-shadow: 0 4px 12px rgba(234, 179, 8, 0.15);
  transform: translateY(-1px);
}

.search-date-input:focus {
  border-color: #eab308;
  box-shadow:
    0 0 0 4px rgba(234, 179, 8, 0.25),
    0 4px 16px rgba(234, 179, 8, 0.2);
  outline: none;
  background: linear-gradient(135deg, #252f3f, #2a3441);
  color: transparent;
  transform: translateY(-2px);
}

.search-date-input:active {
  transform: translateY(0);
}

/* ซ่อน native date text เมื่อมีค่า */
.search-date-input:valid {
  color: transparent;
  border-color: #10b981;
}

.search-date-input:invalid {
  color: transparent;
}

/* Date Input Container */
.date-input-container {
  position: relative;
  transition: all 0.3s ease;
}

.date-input-container::before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 0.875rem;
  background: linear-gradient(
    135deg,
    rgba(234, 179, 8, 0.3),
    rgba(234, 179, 8, 0.1)
  );
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 0;
  pointer-events: none;
}

.date-input-container:hover::before {
  opacity: 1;
}

.date-input-container:focus-within::before {
  opacity: 1;
  background: linear-gradient(
    135deg,
    rgba(234, 179, 8, 0.4),
    rgba(234, 179, 8, 0.2)
  );
}

/* ซ่อน date display เมื่อ input มีค่า */
.search-date-input:valid + .date-display {
  opacity: 0 !important;
  pointer-events: none !important;
  transform: translateY(-5px);
}

.search-date-input:valid ~ .date-selected-display {
  opacity: 1 !important;
  pointer-events: none !important;
  display: flex !important;
}

.search-date-input:invalid + .date-display {
  opacity: 1;
  pointer-events: auto;
}

.search-date-input:focus + .date-display {
  opacity: 0;
  pointer-events: none;
  transform: translateY(-5px);
}

.date-input-wrapper {
  position: relative;
}

/* Date Label Icon Wrapper */
.date-label-icon-wrapper {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: linear-gradient(
    135deg,
    rgba(234, 179, 8, 0.2),
    rgba(234, 179, 8, 0.1)
  );
  border-radius: 6px;
  transition: all 0.3s ease;
}

.date-input-wrapper:hover .date-label-icon-wrapper {
  background: linear-gradient(
    135deg,
    rgba(234, 179, 8, 0.4),
    rgba(234, 179, 8, 0.2)
  );
  transform: scale(1.1) rotate(5deg);
}

.date-display {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 2;
  pointer-events: none;
  user-select: none;
}

.date-display .date-value {
  font-weight: 500;
  transition: all 0.3s ease;
}

.date-display .date-icon-left {
  transition: all 0.3s ease;
  animation: calendarPulse 2s ease-in-out infinite;
}

@keyframes calendarPulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.8;
    transform: scale(1.05);
  }
}

.date-input-container:hover .date-icon-left {
  animation: none;
  transform: scale(1.1);
  color: #fbbf24;
}

.calendar-icon-main {
  transition: all 0.3s ease;
}

.date-input-container:hover .calendar-icon-main {
  transform: scale(1.15) rotate(5deg);
  color: #fbbf24;
  filter: drop-shadow(0 0 8px rgba(234, 179, 8, 0.6));
}

/* Date Selected Display */
.date-selected-display {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 3;
  pointer-events: none;
  user-select: none;
  animation: slideInFromBottom 0.4s ease-out;
}

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

.date-selected-display .date-value-selected {
  font-weight: 600;
  letter-spacing: 0.5px;
}

.date-selected-display .fa-check-circle {
  animation: checkmarkPop 0.5s ease-out;
}

@keyframes checkmarkPop {
  0% {
    transform: scale(0);
    opacity: 0;
  }
  50% {
    transform: scale(1.2);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Booking Summary Animation */
#booking-summary {
  animation: slideDown 0.3s ease-out;
}

#booking-summary.hidden {
  display: none;
}

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

/* [เพิ่ม] สไตล์สำหรับ <input type="date"> ให้เป็น Dark Mode */
input[type="date"] {
  color-scheme: dark;
  cursor: pointer;
  padding-right: 2.75rem; /* เพิ่ม padding ขวาเพื่อให้มีที่สำหรับไอคอน */
  position: relative;
  font-size: 1rem;
  transition: all 0.3s ease;
}

/* ซ่อน native date text สำหรับ search-date-input */
.search-date-input::-webkit-datetime-edit {
  color: transparent !important;
}

.search-date-input::-webkit-datetime-edit-fields-wrapper {
  color: transparent !important;
}

.search-date-input::-webkit-datetime-edit-text {
  color: transparent !important;
  padding: 0;
}

.search-date-input::-webkit-datetime-edit-month-field,
.search-date-input::-webkit-datetime-edit-day-field,
.search-date-input::-webkit-datetime-edit-year-field {
  color: transparent !important;
}

/* Firefox */
.search-date-input::-moz-placeholder {
  color: transparent;
  opacity: 0;
}

input[type="date"]:hover {
  border-color: #eab308;
  background-color: #1f2937;
}

input[type="date"]:focus {
  border-color: #eab308;
  box-shadow: 0 0 0 3px rgba(234, 179, 8, 0.2);
  background-color: #1f2937;
}

/* [เพิ่ม] สไตล์สำหรับไอคอนปฏิทินใน Chrome/Safari (Dark Mode) */
input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(1); /* กลับสีไอคอนเป็นสีขาว */
  cursor: pointer;
  opacity: 0.8;
  margin-right: 0.5rem;
  width: 20px;
  height: 20px;
  transition: all 0.3s ease;
}

input[type="date"]::-webkit-calendar-picker-indicator:hover {
  opacity: 1;
  transform: scale(1.1);
  filter: invert(1) brightness(1.2);
}

/* [เพิ่ม] สไตล์สำหรับไอคอนปฏิทินใน Firefox */
input[type="date"]::-moz-calendar-picker-indicator {
  filter: invert(1);
  cursor: pointer;
  opacity: 0.8;
  width: 20px;
  height: 20px;
  transition: all 0.3s ease;
}

input[type="date"]::-moz-calendar-picker-indicator:hover {
  opacity: 1;
  transform: scale(1.1);
}

/* ปรับปรุงปฏิทินที่แสดงออกมา (Calendar Popup) */
input[type="date"]::-webkit-datetime-edit {
  color: #ffffff;
  padding: 0.5rem;
}

input[type="date"]::-webkit-datetime-edit-fields-wrapper {
  color: #ffffff;
}

input[type="date"]::-webkit-datetime-edit-text {
  color: #9ca3af;
  padding: 0 0.3em;
}

input[type="date"]::-webkit-datetime-edit-month-field {
  color: #ffffff;
}

input[type="date"]::-webkit-datetime-edit-day-field {
  color: #ffffff;
}

input[type="date"]::-webkit-datetime-edit-year-field {
  color: #ffffff;
}

input[type="date"]::-webkit-inner-spin-button {
  display: none;
}

/* สไตล์สำหรับไอคอน FontAwesome ปฏิทิน */
.fa-calendar-alt {
  transition: all 0.3s ease;
}

/* ไอคอนปฏิทินที่คลิกได้ */
.calendar-icon-clickable {
  cursor: pointer !important;
  pointer-events: auto !important;
  z-index: 10;
  transition: all 0.3s ease;
  font-size: 1rem;
  line-height: 1;
  width: 1rem;
  height: 1rem;
  display: inline-block;
  vertical-align: middle;
}

.calendar-icon-clickable:hover {
  color: #eab308 !important;
  transform: scale(1.15) translateY(-50%);
}

/* เพิ่มเอฟเฟกต์เมื่อคลิกที่ input date */
input[type="date"]:active {
  transform: scale(0.98);
}

/* สไตล์สำหรับ placeholder text ใน date input */
input[type="date"]:invalid::-webkit-datetime-edit {
  color: #9ca3af;
}

/* ปรับปรุงการแสดงผลของ date picker ใน mobile */
@media (max-width: 767px) {
  .search-date-input {
    font-size: 0.9rem;
    padding: 0.875rem 3rem 0.875rem 0.875rem;
    border-radius: 0.75rem;
  }

  input[type="date"] {
    font-size: 0.9rem;
    padding: 0.875rem;
    padding-right: 2.5rem;
  }

  input[type="date"]::-webkit-calendar-picker-indicator {
    width: 18px;
    height: 18px;
  }

  .calendar-icon-clickable {
    right: 0.75rem !important;
    font-size: 0.875rem;
    width: 0.875rem;
    height: 0.875rem;
  }

  .date-label-icon-wrapper {
    width: 20px;
    height: 20px;
    font-size: 0.875rem;
  }

  .date-display,
  .date-selected-display {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  .date-display .date-value,
  .date-selected-display .date-value-selected {
    font-size: 0.875rem;
  }

  .date-input-container:hover .calendar-icon-main {
    transform: scale(1.1) rotate(3deg);
  }
}

/* ซ่อนไอคอน dropdown ของ browser */
select::-ms-expand {
  display: none !important;
}

select::-webkit-appearance {
  -webkit-appearance: none !important;
  appearance: none !important;
}

/* Car Type Select - Clean Design */
.car-type-select {
  background-color: #1f2937;
  border: 1px solid #374151;
  color: #ffffff;
  border-radius: 0.5rem;
  padding: 0.75rem;
  width: 100%;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%239ca3af' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 1.25em;
  cursor: pointer;
  max-width: 100%;
  box-sizing: border-box;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.car-type-select:focus {
  border-color: #eab308;
  box-shadow: 0 0 0 2px rgba(234, 179, 8, 0.5);
  outline: none;
}

.car-type-select option {
  background-color: #1f2937;
  color: #ffffff;
  padding: 0.5rem;
  font-size: 1rem;
}

/* Mobile Car Type Select */
@media (max-width: 767px) {
  .car-type-select {
    font-size: 0.9rem;
    padding: 0.875rem;
    min-height: 2.5rem;
    max-width: 100%;
    width: 100%;
  }

  .car-type-select option {
    font-size: 0.9rem;
    padding: 0.5rem;
  }
}

/* สไตล์สำหรับหัวข้อหลักใน Hero Section */
.hero-headline {
  background: linear-gradient(
    to right,
    #eab308,
    #ef4444
  ); /* Amber to Red gradient */
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 800;
}

/* --- Filter Sidebar Styles --- */
#filter-sidebar {
  transition: all 0.3s ease;
}

@media (max-width: 1023px) {
  #filter-sidebar {
    position: fixed;
    top: 0;
    left: -100%;
    width: 85%;
    max-width: 350px;
    height: 100vh;
    z-index: 50;
    background: #1a1a1a;
    overflow-y: auto;
    transition: left 0.3s ease;
    box-shadow: 2px 0 20px rgba(0, 0, 0, 0.5);
    display: none;
  }

  #filter-sidebar:not(.hidden) {
    left: 0;
    display: block;
  }

  #filter-sidebar .bg-gray-900\/70 {
    background: #1a1a1a;
    border-radius: 0;
    border: none;
    height: 100%;
    padding: 1rem;
  }

  /* Mobile filter header adjustments */
  .filter-header {
    padding: 0.75rem;
    font-size: 0.9rem;
  }

  .filter-header span {
    font-size: 0.9rem;
  }

  .filter-header i {
    font-size: 0.8rem;
  }

  /* Mobile filter content adjustments */
  .filter-content {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }

  .filter-content label {
    padding: 0.5rem 0;
    font-size: 0.85rem;
  }

  .filter-content input[type="checkbox"],
  .filter-content input[type="radio"] {
    width: 16px;
    height: 16px;
    margin-right: 0.75rem;
  }

  .filter-content .hero-form-select {
    font-size: 0.85rem;
    padding: 0.5rem;
  }

  /* Mobile button adjustments */
  .btn-primary {
    font-size: 0.9rem;
    padding: 0.75rem 1rem;
  }

  /* Mobile clear filters button */
  #clear-filters {
    font-size: 0.8rem;
    padding: 0.25rem 0.5rem;
  }

  /* Mobile close filter button */
  #close-filter-mobile {
    font-size: 1.1rem;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.3s ease;
  }

  #close-filter-mobile:hover {
    background-color: rgba(75, 85, 99, 0.5);
    transform: scale(1.1);
  }

  /* Mobile filter toggle button */
  #filter-toggle {
    font-size: 0.85rem;
    padding: 0.5rem 0.75rem;
  }

  /* Mobile car grid adjustments */
  .grid.grid-cols-1.md\\:grid-cols-2.xl\\:grid-cols-3 {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  /* Mobile car card adjustments */
  .car-card {
    margin-bottom: 1rem;
  }

  .car-card .p-6 {
    padding: 1rem;
  }

  .car-card h3 {
    font-size: 1.1rem;
  }

  .car-card p {
    font-size: 0.85rem;
  }

  .car-card button {
    font-size: 0.8rem;
    padding: 0.5rem 0.75rem;
  }

  /* Mobile stats section */
  .stats-number {
    font-size: 2rem;
  }

  /* Mobile hero section */
  .hero-headline {
    font-size: 1.6rem;
    line-height: 1.2;
  }

  /* Mobile section title */
  .section-title {
    font-size: 1.3rem;
    white-space: nowrap;
  }

  /* Mobile h2 titles */
  h2 {
    font-size: 1.3rem !important;
    white-space: nowrap;
  }

  /* Mobile section subtitle */
  .text-lg {
    font-size: 1rem;
  }

  /* Mobile car grid title */
  .text-3xl.md\\:text-4xl {
    font-size: 1.4rem !important;
  }

  /* Mobile container adjustments */
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  /* Mobile grid adjustments */
  .grid.grid-cols-1.md\\:grid-cols-2.lg\\:grid-cols-3 {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  /* Mobile flex adjustments */
  .flex.flex-col.lg\\:flex-row {
    flex-direction: column;
  }

  .flex.flex-col.lg\\:flex-row .lg\\:w-80 {
    width: 100%;
    margin-bottom: 1rem;
  }

  /* Mobile sticky positioning fix */
  .sticky.top-24 {
    position: relative;
    top: auto;
  }

  /* Mobile overflow handling */
  body {
    overflow-x: hidden;
  }

  /* Mobile touch improvements */
  .filter-header,
  .car-card,
  button {
    -webkit-tap-highlight-color: rgba(234, 179, 8, 0.2);
    tap-highlight-color: rgba(234, 179, 8, 0.2);
  }

  /* Mobile scroll improvements */
  #filter-sidebar {
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
  }

  /* Mobile fixed search button */
  .fixed.bottom-0 {
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
  }

  #mobile-filter-btn {
    font-size: 0.9rem;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    background: #374151;
    border: none;
    color: white;
    font-weight: 700;
  }

  #mobile-filter-btn:hover {
    background: #4b5563;
    transform: translateY(-1px);
  }

  #mobile-search-btn {
    font-size: 0.9rem;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    box-shadow: 0 4px 20px rgba(234, 179, 8, 0.3);
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #f59e0b, #eab308);
    border: none;
    color: #1a1a1a;
    font-weight: 700;
  }

  #mobile-search-btn:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 6px 25px rgba(234, 179, 8, 0.4);
    background: linear-gradient(135deg, #d97706, #f59e0b);
  }

  #mobile-search-btn:active {
    transform: translateY(0) scale(0.98);
  }

  /* Add bottom padding to body on mobile to prevent content being hidden behind fixed button */
  body {
    padding-bottom: 3.5rem;
  }

  /* Mobile text size adjustments */
  .text-4xl.md\\:text-5xl.lg\\:text-6xl {
    font-size: 1.8rem !important;
    line-height: 1.2;
  }

  .text-lg.md\\:text-xl {
    font-size: 1rem !important;
  }

  .text-xl.font-bold {
    font-size: 1.1rem !important;
  }

  .text-lg.font-bold {
    font-size: 1rem !important;
  }

  /* Mobile spacing adjustments */
  .mb-6 {
    margin-bottom: 1rem;
  }

  .mb-8 {
    margin-bottom: 1.5rem;
  }

  .mb-10 {
    margin-bottom: 2rem;
  }

  .mb-12 {
    margin-bottom: 2.5rem;
  }
}

/* Custom checkbox and radio styles */
input[type="checkbox"],
input[type="radio"] {
  accent-color: #eab308;
}

/* Enhanced Flag Design for Mobile Language Selection */
.flag-container {
  position: relative;
  display: inline-block;
  transition: all 0.3s ease;
}

.flag-container img {
  transition: all 0.3s ease;
  filter: brightness(1.1) contrast(1.1);
}

.language-option-thai:hover .flag-container img {
  filter: brightness(1.3) contrast(1.2) saturate(1.2);
  transform: scale(1.1);
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.3);
}

.language-option-english:hover .flag-container img {
  filter: brightness(1.3) contrast(1.2) saturate(1.2);
  transform: scale(1.1);
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

/* Flag glow effect */
.language-option-thai:hover .flag-container::after {
  content: "";
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(45deg, #dc2626, #ef4444, #dc2626);
  border-radius: 0.375rem;
  z-index: -1;
  opacity: 0.6;
  animation: flagGlow 2s ease-in-out infinite alternate;
}

.language-option-english:hover .flag-container::after {
  content: "";
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(45deg, #3b82f6, #60a5fa, #3b82f6);
  border-radius: 0.375rem;
  z-index: -1;
  opacity: 0.6;
  animation: flagGlow 2s ease-in-out infinite alternate;
}

@keyframes flagGlow {
  0% {
    opacity: 0.4;
    transform: scale(1);
  }
  100% {
    opacity: 0.8;
    transform: scale(1.05);
  }
}

/* Enhanced button styles */
.language-option-thai,
.language-option-english {
  position: relative;
  overflow: hidden;
}

.language-option-thai::before,
.language-option-english::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left 0.5s ease;
}

.language-option-thai:hover::before,
.language-option-english:hover::before {
  left: 100%;
}

/* Active state for selected language */
.language-option-thai.active {
  background: linear-gradient(135deg, #dc2626, #ef4444) !important;
  border-color: #dc2626 !important;
  box-shadow: 0 4px 15px rgba(220, 38, 38, 0.4) !important;
}

.language-option-english.active {
  background: linear-gradient(135deg, #3b82f6, #60a5fa) !important;
  border-color: #3b82f6 !important;
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4) !important;
}

/* Mobile responsive adjustments */
@media (max-width: 767px) {
  .flag-container img {
    width: 20px;
    height: 14px;
  }

  .language-option-thai,
  .language-option-english {
    padding: 0.75rem 1rem;
    font-size: 0.85rem;
  }

  .language-option-thai span,
  .language-option-english span {
    font-size: 0.85rem;
  }
}

/* Hamburger Menu Animation */
.hamburger-icon {
  width: 24px;
  height: 18px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  pointer-events: none;
}

.hamburger-line {
  width: 100%;
  height: 2px;
  background-color: #d1d5db;
  border-radius: 1px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transform-origin: center;
  pointer-events: none;
}

/* Ensure button is clickable */
#mobile-menu-button {
  cursor: pointer;
  pointer-events: auto;
  z-index: 1000;
  position: relative;
}

/* Hamburger Animation States */
#mobile-menu-button.active .hamburger-line:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

#mobile-menu-button.active .hamburger-line:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

#mobile-menu-button.active .hamburger-line:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* Mobile Menu Smooth Animation */
#mobile-menu {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  transform: translateY(-20px);
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  display: block !important; /* Override Tailwind hidden class */
}

#mobile-menu.show {
  transform: translateY(0);
  opacity: 1;
  max-height: 1000px;
}

/* Mobile Menu Items Animation */
#mobile-menu a {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transform: translateX(-20px);
  opacity: 0;
}

#mobile-menu.show a {
  transform: translateX(0);
  opacity: 1;
}

#mobile-menu.show a:nth-child(1) {
  transition-delay: 0.1s;
}
#mobile-menu.show a:nth-child(2) {
  transition-delay: 0.15s;
}
#mobile-menu.show a:nth-child(3) {
  transition-delay: 0.2s;
}
#mobile-menu.show a:nth-child(4) {
  transition-delay: 0.25s;
}
#mobile-menu.show a:nth-child(5) {
  transition-delay: 0.3s;
}
#mobile-menu.show a:nth-child(6) {
  transition-delay: 0.35s;
}

/* Contact Menu Styles */
#contact-menu-btn {
  box-shadow: 0 4px 20px rgba(234, 179, 8, 0.3);
  animation: pulse 2s infinite;
}

#contact-menu-btn:hover {
  box-shadow: 0 6px 25px rgba(234, 179, 8, 0.4);
  animation: none;
}

@keyframes pulse {
  0% {
    box-shadow: 0 4px 20px rgba(234, 179, 8, 0.3);
  }
  50% {
    box-shadow: 0 4px 20px rgba(234, 179, 8, 0.5);
  }
  100% {
    box-shadow: 0 4px 20px rgba(234, 179, 8, 0.3);
  }
}

#contact-menu {
  animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Mobile responsive for contact menu */
@media (max-width: 1023px) {
  #contact-menu-btn {
    width: 3.5rem;
    height: 3.5rem;
    bottom: 5rem;
    right: 1rem;
  }

  #contact-menu {
    bottom: 9.5rem;
    right: 0;
    min-width: 200px;
  }

  #contact-menu .space-y-3 > * {
    padding: 0.5rem;
  }

  #contact-menu .w-10 {
    width: 2rem;
    height: 2rem;
  }

  #contact-menu span {
    font-size: 0.8rem;
  }

  #contact-menu .fas,
  #contact-menu .fab {
    font-size: 0.9rem;
  }

  /* Mobile form improvements */
  .hero-section-bg {
    padding: 2rem 0;
  }

  .hero-headline {
    font-size: 1.8rem !important;
    line-height: 1.2;
    margin-bottom: 1rem;
  }

  .hero-section-bg p {
    font-size: 1rem !important;
    margin-bottom: 1.5rem;
  }

  .hero-section-bg .btn-primary,
  .hero-section-bg .btn-outline {
    font-size: 0.9rem;
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
  }

  /* Mobile Search Form - Full Width Design */
  .mobile-search-form {
    background-color: rgba(17, 24, 39, 0.7);
    backdrop-filter: blur(12px);
    border: 1px solid #374151;
    border-radius: 1rem;
    padding: 1.5rem;
    width: 100%;
    margin: 0;
    max-width: 100%;
    box-sizing: border-box;
  }

  /* Desktop - Centered with max width */
  @media (min-width: 1024px) {
    .mobile-search-form {
      max-width: 28rem;
      padding: 2rem;
      margin: 0 auto;
    }
  }

  /* Tablet - Centered */
  @media (min-width: 768px) and (max-width: 1023px) {
    .mobile-search-form {
      max-width: 32rem;
      padding: 2rem;
      margin: 0 auto;
    }
  }

  /* Mobile - Force container width control */
  @media (max-width: 767px) {
    .mobile-search-form {
      width: 100% !important;
      max-width: 100% !important;
      margin: 0 !important;
      padding: 1.5rem !important;
    }

    .mobile-search-form .relative {
      width: 100% !important;
      max-width: 100% !important;
    }

    .mobile-search-form .hero-form-select {
      width: 100% !important;
      max-width: 100% !important;
      box-sizing: border-box !important;
    }
  }

  /* Form inputs mobile */
  .hero-form-input,
  .hero-form-select {
    font-size: 1rem;
    padding: 1rem;
    height: auto;
    border-radius: 0.75rem;
  }

  /* Form labels mobile */
  .hero-section-bg label {
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
    font-weight: 500;
  }

  /* Form icons mobile */
  .hero-section-bg .fas {
    font-size: 0.9rem;
  }

  /* Form button mobile */
  .hero-section-bg button[type="submit"] {
    font-size: 1rem;
    padding: 1rem 1.5rem;
    border-radius: 0.75rem;
    font-weight: 600;
  }

  /* Form title mobile */
  .hero-section-bg h3 {
    font-size: 1.5rem !important;
    margin-bottom: 1.5rem !important;
  }
}

/* Logo styles */
.logo-container {
  filter: brightness(1.1) contrast(1.1);
  transition: all 0.3s ease;
  mix-blend-mode: screen;
}

.logo-container:hover {
  filter: brightness(1.2) contrast(1.2);
  transform: scale(1.05);
}

nav img {
  filter: brightness(1.1) contrast(1.1);
  transition: all 0.3s ease;
}

nav img:hover {
  filter: brightness(1.2) contrast(1.2);
  transform: scale(1.05);
}

/* Contact badge improvements */
.contact-badge {
  cursor: pointer;
  user-select: none;
}

.contact-badge:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.contact-badge:active {
  transform: translateY(0);
}

/* Mobile logo adjustments */
/* Mobile Contact Badges Size Reduction */
@media (max-width: 1023px) {
  nav img {
    height: 2.5rem;
  }

  .contact-badge {
    padding: 0.4rem 0.6rem;
    font-size: 0.8rem;
    margin: 0.25rem 0;
  }

  /* Mobile header height reduction */
  nav .container .flex {
    padding: 0.5rem 0;
  }

  /* Mobile logo text size */
  nav .text-lg {
    font-size: 1rem;
  }

  nav .text-xs {
    font-size: 0.7rem;
  }

  /* Mobile menu contact badges */
  #mobile-menu .contact-badge {
    padding: 0.4rem 0.6rem;
    font-size: 0.8rem;
    margin: 0.125rem 0;
  }

  #mobile-menu .flex.flex-wrap.gap-2.mb-4 {
    margin-bottom: 0.75rem;
    gap: 0.5rem;
  }
}

/* Filter toggle button */
#filter-toggle {
  transition: all 0.3s ease;
}

#filter-toggle:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Filter accordion styles */
.filter-header {
  transition: all 0.3s ease;
}

.filter-header:hover {
  background-color: rgba(75, 85, 99, 0.8) !important;
}

.filter-content {
  transition: all 0.3s ease;
  overflow: hidden;
}

.filter-content.hidden {
  max-height: 0;
  opacity: 0;
}

.filter-content:not(.hidden) {
  max-height: 500px;
  opacity: 1;
}

/* Smooth accordion animation */
.filter-content {
  transition:
    max-height 0.3s ease,
    opacity 0.3s ease,
    padding 0.3s ease;
}

.filter-content.hidden {
  padding-top: 0;
  padding-bottom: 0;
}

.filter-content:not(.hidden) {
  padding-top: 0.75rem;
  padding-bottom: 0;
}

/* Mobile Fine Rates Table Styles */
@media (max-width: 767px) {
  /* Mobile table container */
  .md\\:hidden table {
    border-collapse: collapse;
    width: 100%;
    font-size: 0.75rem;
  }

  /* Mobile table headers */
  .md\\:hidden table th {
    padding: 0.5rem 0.25rem;
    font-size: 0.7rem;
    font-weight: 700;
    text-align: center;
    background-color: #374151;
    border: 1px solid #4b5563;
  }

  /* Mobile table cells */
  .md\\:hidden table td {
    padding: 0.5rem 0.25rem;
    font-size: 0.7rem;
    border: 1px solid #4b5563;
    vertical-align: top;
  }

  /* Mobile table first column (สาเหตุ) */
  .md\\:hidden table td:first-child {
    text-align: left;
    width: 60%;
    padding-left: 0.5rem;
  }

  /* Mobile table second column (ค่าปรับ) */
  .md\\:hidden table td:last-child {
    text-align: right;
    width: 40%;
    padding-right: 0.5rem;
  }

  /* Mobile table icons */
  .md\\:hidden table .fas {
    font-size: 0.6rem;
    margin-right: 0.25rem;
  }

  /* Mobile table fine amounts */
  .md\\:hidden table .text-amber-400 {
    font-weight: 700;
    font-size: 0.7rem;
  }

  /* Mobile table notes - New class for better control */
  .mobile-note {
    font-size: 0.6rem !important;
    color: #9ca3af !important;
    margin-top: 0.125rem;
    line-height: 1;
    display: block;
    font-weight: 400;
    opacity: 0.8;
  }

  /* Mobile table fine amounts with notes */
  .md\\:hidden table td:last-child {
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
    font-size: 0.7rem;
    line-height: 1.2;
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
  }

  /* Mobile table fine amounts text */
  .md\\:hidden table td:last-child .text-amber-400 {
    font-size: 0.7rem;
    font-weight: 700;
    display: block;
    margin-bottom: 0.125rem;
  }

  /* Mobile table hover effects */
  .md\\:hidden table tr:hover {
    background-color: rgba(55, 65, 81, 0.5);
  }

  /* Mobile table responsive text */
  .md\\:hidden table td div {
    line-height: 1.3;
  }

  /* Mobile table overflow handling */
  .md\\:hidden .overflow-x-auto {
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #4b5563 #1f2937;
  }

  .md\\:hidden .overflow-x-auto::-webkit-scrollbar {
    height: 4px;
  }

  .md\\:hidden .overflow-x-auto::-webkit-scrollbar-track {
    background: #1f2937;
  }

  .md\\:hidden .overflow-x-auto::-webkit-scrollbar-thumb {
    background: #4b5563;
    border-radius: 2px;
  }

  .md\\:hidden .overflow-x-auto::-webkit-scrollbar-thumb:hover {
    background: #6b7280;
  }
}

/* Profile Page Styles */
.profile-menu-item {
  display: flex;
  align-items: center;
  padding: 0.75rem 1rem;
  color: #d1d5db;
  text-decoration: none;
  border-radius: 0.5rem;
  transition: all 0.3s ease;
  border-left: 3px solid transparent;
}

.profile-menu-item:hover {
  background-color: rgba(234, 179, 8, 0.1);
  color: #fbbf24;
  border-left-color: #eab308;
  transform: translateX(5px);
}

.profile-menu-item.active {
  background: linear-gradient(
    135deg,
    rgba(234, 179, 8, 0.2),
    rgba(234, 179, 8, 0.1)
  );
  color: #fbbf24;
  border-left-color: #eab308;
  font-weight: 600;
}

.profile-menu-item i.fa-chevron-right {
  transition: transform 0.3s ease;
}

.profile-menu-item:hover i.fa-chevron-right {
  transform: translateX(3px);
}

.profile-form-input {
  background-color: #1f2937;
  border: 1px solid #374151;
  color: #ffffff;
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  width: 100%;
  transition: all 0.3s ease;
  font-size: 1rem;
}

.profile-form-input:focus {
  border-color: #eab308;
  box-shadow: 0 0 0 3px rgba(234, 179, 8, 0.2);
  outline: none;
}

.profile-form-input:disabled,
.profile-form-input[readonly] {
  background-color: #111827;
  border-color: #374151;
  cursor: not-allowed;
  opacity: 0.7;
}

/* Profile sidebar responsive */
@media (max-width: 1023px) {
  .profile-menu-item {
    padding: 0.625rem 0.875rem;
    font-size: 0.9rem;
  }

  .profile-menu-item i {
    font-size: 0.875rem;
  }
}

/* ============================================
   Custom Date Picker Styles
   ============================================ */

.custom-date-picker-wrapper {
  position: relative;
  z-index: 10;
}

/* When modal is active, ensure wrapper doesn't interfere */
.custom-date-picker-wrapper.active {
  position: static;
}

.custom-date-picker-btn {
  background: linear-gradient(135deg, #1f2937, #252f3f);
  border: 2px solid #374151;
  border-radius: 0.875rem;
  padding: 1rem 1.25rem;
  width: 100%;
  font-size: 1rem;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  text-align: left;
  position: relative;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.custom-date-picker-btn:hover {
  border-color: #eab308;
  background: linear-gradient(135deg, #252f3f, #2a3441);
  box-shadow: 0 4px 12px rgba(234, 179, 8, 0.15);
  transform: translateY(-1px);
}

.custom-date-picker-wrapper.active .custom-date-picker-btn {
  border-color: #eab308;
  box-shadow:
    0 0 0 4px rgba(234, 179, 8, 0.25),
    0 4px 16px rgba(234, 179, 8, 0.2);
  transform: translateY(-2px);
}

.custom-date-picker-wrapper.active .custom-date-picker-btn .fa-chevron-down {
  transform: rotate(180deg);
}

.custom-date-picker-btn.has-value {
  border-color: #10b981;
}

.custom-date-picker-btn.has-value .custom-date-display {
  color: #ffffff;
  font-weight: 600;
}

/* Custom Date Picker Modal Overlay */
.custom-date-picker-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  z-index: 9998;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  pointer-events: none;
}

.custom-date-picker-wrapper.active .custom-date-picker-modal-overlay {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* Custom Date Picker Popup (Modal) */
.custom-date-picker-popup {
  position: relative;
  width: 100%;
  max-width: 420px;
  background: linear-gradient(135deg, #1a1a1a, #252525);
  border: 1px solid #374151;
  border-radius: 1rem;
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.9),
    0 0 30px rgba(234, 179, 8, 0.2);
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: scale(0.9) translateY(20px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 9999;
  max-height: 90vh;
  overflow-y: auto;
  pointer-events: auto;
}

.custom-date-picker-wrapper.active .custom-date-picker-popup {
  opacity: 1;
  visibility: visible;
  transform: scale(1) translateY(0);
}

/* Prevent other elements from showing above modal */
.custom-date-picker-wrapper.active {
  z-index: 10000;
}

/* Hide any date input overlays when modal is active */
.custom-date-picker-wrapper.active input[type="date"],
.custom-date-picker-wrapper.active .date-display,
.custom-date-picker-wrapper.active .date-selected-display,
.custom-date-picker-wrapper.active .search-date-input,
.custom-date-picker-wrapper.active .date-input-container {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
  position: absolute !important;
  z-index: -1 !important;
}

/* Ensure modal overlay is on top of everything */
body:has(.custom-date-picker-wrapper.active) {
  overflow: hidden !important;
}

/* Ensure modal overlay appears above all other content */
.custom-date-picker-modal-overlay {
  z-index: 99998 !important;
}

.custom-date-picker-popup {
  z-index: 99999 !important;
}

/* Ensure modal overlay and popup are fixed positioned when active */
.custom-date-picker-wrapper.active .custom-date-picker-modal-overlay {
  position: fixed !important;
  z-index: 99998 !important;
}

.custom-date-picker-wrapper.active .custom-date-picker-popup {
  position: relative !important;
  z-index: 99999 !important;
}

/* Calendar grid inside custom-date-picker-popup (used by car-detail.php & JS renderCalendar) */
.date-picker-header {
  padding: 1.25rem;
  border-bottom: 1px solid #374151;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(135deg, #1a1a1a, #252525);
}

.date-picker-month-year {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #ffffff;
  font-weight: 600;
  font-size: 1.1rem;
}

.date-picker-nav {
  display: flex;
  gap: 0.5rem;
}

.date-picker-nav-btn {
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid #374151;
  border-radius: 0.5rem;
  color: #9ca3af;
  cursor: pointer;
  transition: all 0.2s;
}

.date-picker-nav-btn:hover {
  background: #374151;
  color: #ffffff;
  border-color: #4b5563;
}

.date-picker-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.25rem;
  padding: 0.75rem 1rem;
  background: #1a1a1a;
}

.date-picker-weekday {
  text-align: center;
  color: #9ca3af;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.5rem;
}

.date-picker-weekday.current-day {
  color: #eab308;
}

.date-picker-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.25rem;
  padding: 0.75rem 1rem;
}

.date-picker-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.2s;
  color: #ffffff;
  font-weight: 500;
  position: relative;
}

.date-picker-day.other-month {
  color: #4b5563;
}

.date-picker-day.disabled {
  color: #374151;
  cursor: not-allowed;
  opacity: 0.5;
}

.date-picker-day:hover:not(.disabled):not(.selected) {
  background: rgba(59, 130, 246, 0.2);
  color: #ffffff;
}

.date-picker-day.selected {
  background: rgba(59, 130, 246, 0.4);
  color: #ffffff;
  font-weight: 600;
}

.date-picker-day.today:not(.selected) {
  border: 2px solid #eab308;
}

.date-picker-day.today.selected {
  border: 2px solid #60a5fa;
}

.date-picker-footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid #374151;
  display: flex;
  justify-content: space-between;
  background: #1a1a1a;
}

.date-picker-footer-btn {
  background: transparent;
  border: none;
  color: #60a5fa;
  cursor: pointer;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  transition: all 0.2s;
}

.date-picker-footer-btn:hover {
  background: rgba(96, 165, 250, 0.1);
}

/* Calendar Header */
.calendar-header {
  padding: 1rem;
  background: linear-gradient(
    135deg,
    rgba(234, 179, 8, 0.1),
    rgba(234, 179, 8, 0.05)
  );
  border-bottom: 1px solid #374151;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.calendar-nav-btn {
  background: rgba(234, 179, 8, 0.2);
  border: 1px solid rgba(234, 179, 8, 0.3);
  color: #eab308;
  border-radius: 0.5rem;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.calendar-nav-btn:hover {
  background: rgba(234, 179, 8, 0.3);
  transform: scale(1.1);
}

.calendar-month-year {
  font-weight: 700;
  color: #ffffff;
  font-size: 1.1rem;
  text-align: center;
  flex: 1;
}

/* Calendar Body */
.calendar-body {
  padding: 1rem;
}

.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.calendar-weekday {
  text-align: center;
  font-weight: 600;
  color: #9ca3af;
  font-size: 0.875rem;
  padding: 0.5rem 0;
}

.calendar-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.5rem;
}

.calendar-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
  font-weight: 500;
  color: #d1d5db;
  background: transparent;
  border: 1px solid transparent;
  position: relative;
}

.calendar-day:hover {
  background: rgba(234, 179, 8, 0.2);
  border-color: rgba(234, 179, 8, 0.4);
  transform: scale(1.1);
  color: #ffffff;
}

.calendar-day.other-month {
  color: #4b5563;
  opacity: 0.5;
}

.calendar-day.today {
  background: rgba(234, 179, 8, 0.3);
  border-color: #eab308;
  color: #ffffff;
  font-weight: 700;
}

.calendar-day.selected {
  background: linear-gradient(135deg, #eab308, #d97706);
  border-color: #eab308;
  color: #1a1a1a;
  font-weight: 700;
  box-shadow: 0 0 15px rgba(234, 179, 8, 0.5);
  transform: scale(1.1);
}

.calendar-day.disabled {
  opacity: 0.3;
  cursor: not-allowed;
  color: #6b7280;
}

.calendar-day.disabled:hover {
  background: transparent;
  transform: none;
}

/* Calendar Footer */
.calendar-footer {
  padding: 0.75rem 1rem;
  border-top: 1px solid #374151;
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  background: rgba(17, 24, 39, 0.5);
}

.calendar-footer-btn {
  flex: 1;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  font-weight: 600;
  font-size: 0.875rem;
  transition: all 0.3s ease;
  cursor: pointer;
  border: 1px solid transparent;
}

.calendar-footer-btn.clear {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.3);
}

.calendar-footer-btn.clear:hover {
  background: rgba(239, 68, 68, 0.3);
  transform: translateY(-1px);
}

.calendar-footer-btn.today {
  background: rgba(234, 179, 8, 0.2);
  color: #eab308;
  border-color: rgba(234, 179, 8, 0.3);
}

.calendar-footer-btn.today:hover {
  background: rgba(234, 179, 8, 0.3);
  transform: translateY(-1px);
}

/* File Upload Styles */
.file-upload-wrapper {
  position: relative;
}

.file-upload-label {
  display: block;
  cursor: pointer;
  transition: all 0.3s ease;
}

.file-upload-content {
  background: linear-gradient(135deg, #1a1a1a, #252525);
  border: 2px dashed #374151;
  border-radius: 1rem;
  padding: 2rem;
  text-align: center;
  transition: all 0.3s ease;
  min-height: 180px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  user-select: none;
  pointer-events: auto !important;
  cursor: pointer !important;
}

.file-upload-label {
  cursor: pointer !important;
}

.file-upload-label * {
  pointer-events: auto !important;
  cursor: pointer !important;
}

.file-upload-label:hover .file-upload-content {
  border-color: #eab308;
  background: linear-gradient(135deg, #252525, #2a2a2a);
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(234, 179, 8, 0.1);
}

.file-upload-label:active .file-upload-content {
  transform: translateY(0);
}

.file-upload-content.has-file {
  border-color: #10b981 !important;
  background: linear-gradient(
    135deg,
    rgba(16, 185, 129, 0.1),
    rgba(16, 185, 129, 0.05)
  ) !important;
  border-style: solid !important;
}

.file-upload-content.has-file i {
  color: #10b981 !important;
}

.file-upload-content.has-file p {
  color: #10b981 !important;
}

/* Payment Method Selection */
.payment-method-btn.active {
  border-color: #eab308;
  background: linear-gradient(135deg, #2a2a2a, #1a1a1a);
}

.payment-method-btn.active i {
  color: #eab308;
}

.payment-method-content {
  transition: all 0.3s ease;
}

/* Mobile Responsive */
@media (max-width: 767px) {
  .custom-date-picker-btn {
    padding: 0.875rem 1rem;
    font-size: 0.9rem;
  }

  .custom-date-picker-popup {
    max-width: calc(100vw - 2rem);
    border-radius: 0.875rem;
  }

  .calendar-day {
    font-size: 0.875rem;
  }

  .calendar-month-year {
    font-size: 1rem;
  }

  .calendar-header {
    padding: 0.875rem;
  }

  .calendar-body {
    padding: 0.875rem;
  }
}
