@font-face {
  font-family: 'DIN Pro';
  src: local('DIN Pro'), local('DINPro'),
    url('https://fonts.cdnfonts.com/s/16257/DINPro-Light.woff') format('woff');
  font-weight: 300;
  font-style: normal;
}

.autopilot-booking-form {
  background: #fff;
  padding: 20px;
  border-radius: 20px;
  display: flex;
  gap: 30px;
  align-items: flex-end;
  justify-content: space-between;
  font-family: 'DIN Pro', Arial, sans-serif;
  font-size: 14px;
  font-weight: 300;
  width: 100%;
  box-sizing: border-box;
}

.autopilot-booking-form > div {
  flex: 1 1 25%;
  max-width: 25%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-end;
}

.autopilot-booking-form > div:last-child {
  align-items: center;
  justify-content: flex-end;
  height: 100%;
}

.autopilot-booking-form label {
  font-weight: bold;
  font-family: 'DIN Pro', Arial, sans-serif;
  font-size: 14px;
}

.ap-date-time-group {
  position: relative;
  display: flex;
  align-items: center;
  background: #f3f3f3;
  border-radius: 15px;
  padding: 0 16px;
  min-width: 260px;
  height: 50px;
  font-size: 14px;
  font-family: 'DIN Pro', Arial, sans-serif;
  font-weight: 300;
  width: 100%;
  box-sizing: border-box;
  transition: box-shadow 0.2s;
}

.ap-date-time-group:hover {
  background: #f3f3f3;
}

.ap-date-time-group input[type="date"],
.ap-date-time-group input[type="time"] {
  border: none;
  background: transparent;
  font-size: 14px;
  font-family: 'DIN Pro', Arial, sans-serif;
  font-weight: 300;
  outline: none;
  padding: 0;
  margin: 0;
  width: 115px;
  cursor: pointer;
  color: #333;
  z-index: 2;
}

.ap-date-time-group input[type="time"] {
  width: 65px;
  text-align: center;
}

.ap-date-time-group .ap-calendar-icon {
  width: 14px;
  height: 14px;
  margin-right: 10px;
  flex-shrink: 0;
  cursor: pointer;
}

.ap-date-time-group .ap-divider {
  width: 1px;
  height: 28px;
  background: #e0e0e0;
  margin: 0 12px;
}

.ap-time-arrow {
  background: #e0e0e0;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: auto;
  cursor: pointer;
}

.ap-date-time-group input[type="date"]::-webkit-calendar-picker-indicator,
.ap-date-time-group input[type="time"]::-webkit-calendar-picker-indicator {
  opacity: 0;
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  cursor: pointer;
}

.ap-date-time-group input[type="time"]::-webkit-inner-spin-button,
.ap-date-time-group input[type="time"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.ap-date-time-group input[type="time"]::-moz-focus-inner {
  border: 0;
}

.autopilot-booking-form button[type="submit"] {
  background: #e1251b;
  color: #fff;
  padding: 0 40px;
  border: none;
  border-radius: 15px;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'DIN Pro', Arial, sans-serif;
  font-weight: 300;
  width: 100%;
  height: 50px;
  justify-content: center;
  box-sizing: border-box;
  transition: background-color 0.2s;
}

.autopilot-booking-form button[type="submit"]:hover {
  background: #c41e15;
}

.autopilot-booking-form button[type="submit"] img {
  width: 22px;
  height: 22px;
  margin-left: 8px;
  display: inline-block;
  vertical-align: middle;
}

.ap-select-input {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background: transparent;
  border: none;
  outline: none;
  font-size: 14px;
  font-family: 'DIN Pro', Arial, sans-serif;
  font-weight: 300;
  width: 100%;
  padding: 0;
  margin: 0;
}

.autopilot-booking-form .ap-date-time-group.select-group {
  position: relative;
  padding: 0;
  background: #f3f3f3;
  border-radius: 15px;
  height: 50px;
  min-width: 260px;
  width: 100%;
  display: flex;
  align-items: center;
}

.autopilot-booking-form .ap-date-time-group.select-group select.ap-select-input {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
}

.autopilot-booking-form .ap-date-time-group.select-group .ap-calendar-icon {
  margin-left: 16px;
  margin-right: 10px;
  z-index: 1;
  width: 22px;
  height: 22px;
}

.autopilot-booking-form .ap-date-time-group.select-group .ap-select-label {
  font-size: 14px;
  font-family: 'DIN Pro', Arial, sans-serif;
  font-weight: 300;
  z-index: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: calc(100% - 90px);
  padding-right: 10px;
}

.autopilot-booking-form .ap-date-time-group.select-group .ap-select-arrow {
  background: #e0e0e0;
  border-radius: 50%;
  min-width: 24px;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: auto;
  margin-right: 8px;
  z-index: 1;
  flex-shrink: 0;
}

.autopilot-booking-form .ap-date-time-group.select-group .ap-location-icon {
  margin-left: 16px;
  margin-right: 10px;
  z-index: 1;
  width: 14px;
  height: 14px;
}

select.ap-select-input option {
  padding: 12px 24px;
  color: #333;
  transition: background 0.2s ease;
  border: none;
  font-size: 14px;
  font-family: 'DIN Pro', Arial, sans-serif;
}

.ap-select-input optgroup,
.ap-select-input option {
  padding-left: 24px !important;
  padding-right: 24px !important;
  margin: 4px 0;
}

select.ap-select-input option:hover,
select.ap-select-input option:focus {
  background-color: rgba(0, 0, 0, 0.05);
}

select.ap-select-input option:checked {
  background-color: rgba(65, 105, 225, 0.1);
  color: #000;
  font-weight: 500;
}

@supports (-webkit-appearance: none) or (-moz-appearance: none) {
  .ap-select-input::-ms-expand {
    display: none;
  }

  .ap-select-input option,
  .ap-select-input optgroup {
    background-color: white;
  }

  ::-webkit-calendar-picker-indicator {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="15" viewBox="0 0 24 24"><path fill="%23555" d="M20 3h-1V1h-2v2H7V1H5v2H4c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 18H4V8h16v13z"/></svg>');
  }
}

input[type="date"],
input[type="time"] {
  color: #333;
}

.ap-date-time-group:hover {
  background-color: #f8f8f8;
  transition: background-color 0.2s ease;
}

.ap-date-time-group.focus {
  box-shadow: 0 0 0 2px #0033a1 !important;
  transition: box-shadow 0.2s ease;
}

@media screen and (-webkit-min-device-pixel-ratio: 0) {
  select {
    -webkit-appearance: none;
    appearance: none;
  }

  select:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(225, 37, 27, 0.2);
  }
}

.autopilot-booking-form .ap-date-time-group.select-group .ap-select-label {
  font-weight: 400;
}

.custom-time-picker {
  position: relative;
  width: 90px;
  display: flex;
  align-items: center;
}

.custom-time-input {
  background: transparent !important;
  border: none !important;
  outline: none !important;
  width: 100%;
  font-size: 14px;
  font-family: 'DIN Pro', Arial, sans-serif;
  font-weight: 300;
  cursor: pointer;
  text-align: left;
  padding: 0;
  margin: 0;
  color: #333;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  appearance: none !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  border-color: transparent !important;
}

.custom-time-input:focus,
.custom-time-input:hover,
.custom-time-input:active,
.custom-time-input:visited {
  outline: none !important;
  box-shadow: none !important;
  border: none !important;
  border-color: transparent !important;
}

.custom-time-input::-webkit-inner-spin-button,
.custom-time-input::-webkit-outer-spin-button,
.custom-time-input::-webkit-clear-button,
.custom-time-input::-webkit-datetime-edit {
  -webkit-appearance: none !important;
}

.custom-time-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
  width: 120px;
  max-height: 300px;
  overflow-y: auto;
  z-index: 1000;
  padding: 8px 0;
  margin-top: 5px;
}

.custom-time-dropdown.active {
  display: block;
}

.time-options {
  display: flex;
  flex-direction: column;
}

.time-option {
  padding: 8px 16px;
  font-size: 14px;
  font-family: 'DIN Pro', Arial, sans-serif;
  cursor: pointer;
  transition: background-color 0.2s;
}

.time-option:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

.time-option.selected {
  background-color: rgba(65, 105, 225, 0.1);
  font-weight: 500;
}

.ap-time-select {
  background: #f3f3f3;
  border: none;
  border-radius: 15px;
  height: 50px;
  min-width: 100px;
  font-size: 14px;
  font-family: 'DIN Pro', Arial, sans-serif;
  font-weight: 300;
  color: #333;
  padding: 0 16px;
  outline: none;
  box-sizing: border-box;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  cursor: pointer;
  transition: background 0.2s;
  margin: 0;
  width: 100%;
}

.ap-time-select:focus {
  box-shadow: 0 0 0 2px rgba(225, 37, 27, 0.2);
  background: #f8f8f8;
}

.ap-time-select option {
  padding: 12px 24px;
  color: #333;
  font-size: 14px;
  font-family: 'DIN Pro', Arial, sans-serif;
}

.ap-time-select::-ms-expand {
  display: none;
}

.ap-date-time-group .ap-time-arrow {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  background: #e0e0e0;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.ap-date-time-group {
  position: relative;
}

.ap-time-select {
  max-height: 220px;
  overflow-y: auto;
}

.ap-time-select::-webkit-scrollbar {
  width: 8px;
  background: #eee;
}

.ap-time-select::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 4px;
}

.ap-custom-time-wrap {
  position: relative;
  width: 100%;
  min-width: 100px;
  display: flex;
  align-items: center;
}

.ap-custom-time-input {
  background: #f3f3f3;
  border: none !important;
  border-radius: 15px;
  height: 50px;
  font-size: 14px;
  font-family: 'DIN Pro', Arial, sans-serif;
  font-weight: 300;
  color: #333;
  padding: 0 16px;
  outline: none;
  box-sizing: border-box;
  width: 100%;
  cursor: pointer;
  transition: background 0.2s;
}

.ap-custom-time-input:focus {
  box-shadow: none !important;
  background: #f3f3f3 !important;
}

.ap-custom-time-arrow {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  background: #e0e0e0;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.ap-custom-time-dropdown {
  display: none;
  position: absolute;
  left: 0;
  top: 54px;
  width: 100%;
  background: #fff;
  border-radius: 15px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
  max-height: 220px;
  overflow-y: auto;
  z-index: 1000;
  padding: 4px 0;
  margin: 0;
  list-style: none;
}

.ap-custom-time-dropdown.open {
  display: block;
}

.ap-custom-time-dropdown li {
  padding: 12px 24px;
  font-size: 14px;
  font-family: 'DIN Pro', Arial, sans-serif;
  color: #333;
  cursor: pointer;
  border-radius: 8px;
  margin: 0 4px;
  transition: background 0.15s;
}

.ap-custom-time-dropdown li.selected,
.ap-custom-time-dropdown li:hover {
  background: #f3f3f3;
}

.ap-custom-date-input {
  background: #f3f3f3;
  border: none !important;
  border-color: transparent !important;
  border-radius: 15px;
  height: 50px;
  font-size: 14px;
  font-family: 'DIN Pro', Arial, sans-serif;
  font-weight: 300;
  color: #333;
  padding: 0 16px;
  outline: none;
  box-sizing: border-box;
  width: 100%;
  transition: background 0.2s;
}

.ap-custom-date-input:focus {
  box-shadow: none !important;
  background: #f3f3f3 !important;
}

.ap-custom-date-input:hover,
.ap-custom-time-input:hover {
  background: #f3f3f3 !important;
}

@media (max-width: 900px) {
  .autopilot-booking-form {
    gap: 16px;
  }
  .autopilot-booking-form > div {
    min-width: 120px;
    max-width: 100%;
  }
}

@media (max-width: 700px) {
  .autopilot-booking-form {
    flex-wrap: wrap;
    gap: 12px;
  }
  .autopilot-booking-form > div {
    flex: 1 1 45%;
    min-width: 140px;
    max-width: 100%;
  }
  .autopilot-booking-form > div:last-child {
    flex-basis: 100%;
    width: 100%;
    margin-top: 8px;
  }
}

@media (max-width: 500px) {
  .autopilot-booking-form {
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 10px;
    align-items: stretch;
  }
  .autopilot-booking-form > div {
    min-width: 0;
    max-width: 100%;
    width: 100%;
    flex-basis: 100%;
  }
  .autopilot-booking-form button[type="submit"] {
    width: 100%;
    margin-top: 8px;
  }
}

.ap-custom-dropdown {
  display: none;
  position: absolute;
  left: 0;
  top: 100%;
  width: 100%;
  background: #fff;
  border-radius: 15px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  margin-top: 5px;
  max-height: 250px;
  overflow-y: auto;
}

input#pickup_date_display,
input#return_date_display {
  border: none;
  background: transparent !important;
  box-shadow: none;
  padding: 0;
}

.ap-date-time-group input.ap-custom-input,
.ap-date-time-group input.ap-custom-time-input {
  background: transparent !important;
  box-shadow: none;
  border: none;
  padding: 0;
  -webkit-appearance: none;
  appearance: none;
}

.ap-custom-dropdown.ap-custom-calendar {
  max-height: none;
  overflow: visible;
}

.ap-custom-dropdown.open {
  display: block;
}

.ap-dropdown-content {
  padding: 8px 0;
}

.ap-dropdown-item {
  padding: 12px 16px;
  font-size: 14px;
  font-family: 'DIN Pro', Arial, sans-serif;
  color: #333;
  cursor: pointer;
  transition: background-color 0.15s;
}

.ap-dropdown-item:hover,
.ap-dropdown-item.selected {
  background: #f3f3f3;
}

.ap-custom-calendar {
  padding: 16px;
  width: 280px;
}

.ap-calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.ap-custom-calendar .ap-calendar-nav {
  background: #0133a1 !important;
  border: none !important;
  cursor: pointer;
  padding: 0 !important;
  border-radius: 50% !important;
  transition: all 0.2s;
  font-size: 18px !important;
  width: 40px !important;
  height: 40px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: white !important;
  font-weight: bold !important;
  margin: 0 !important;
  gap: 0 !important;
}

.ap-custom-calendar .ap-calendar-nav:hover {
  background: #0147c7 !important;
  transform: scale(1.05);
}

.ap-custom-calendar .ap-calendar-nav:active {
  transform: scale(0.95);
}

.ap-calendar-title {
  font-size: 16px;
  font-weight: 500;
}

.ap-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.ap-calendar-day-header {
  text-align: center;
  padding: 8px 4px;
  font-size: 12px;
  color: #666;
  font-weight: 500;
}

.ap-calendar-day {
  text-align: center;
  padding: 8px 4px;
  cursor: pointer;
  border-radius: 8px;
  transition: background-color 0.2s;
  font-size: 14px;
  min-height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ap-calendar-day:hover {
  background: #f3f3f3;
}

.ap-calendar-day.selected {
  background: #e1251b;
  color: white;
}

.ap-calendar-day.other-month {
  color: #ccc;
}

.ap-calendar-day.disabled {
  color: #ccc;
  cursor: not-allowed;
  background: #f8f8f8;
  opacity: 0.5;
  pointer-events: none;
}

.autopilot-booking-form .ap-calendar-day.disabled,
.autopilot-booking-form .ap-calendar-day.disabled:hover {
  color: #ccc;
  cursor: not-allowed;
  background: #f8f8f8;
  opacity: 0.5;
  pointer-events: none;
}

.ap-calendar-day.today {
  background: #e3f2fd;
  font-weight: 500;
}

.ap-calendar-day.today.selected {
  background: #e1251b;
  color: white;
}
