/* =============== FORM WRAPPER =============== */
.carform-box {
  max-width: 420px;
  margin: auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* =============== FIELD CARD =============== */
.carform-field {
  background: #fff;
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: 0 0 10px rgba(0, 0, 0, .05);
  cursor: pointer;
  position: relative;
}

.carform-top {
  display: flex;
  align-items: center;
  color: #0057ff;
  font-size: 14px;
}

.carform-label-box {
  display: flex;
  align-items: center;
  gap: 10px;
}

.carform-label-box span {
  font-size: 20px;
  color: var(--main);
}

.carform-top span {
  font-size: 20px;
  color: var(--main);
}

.carform-top-icon {
  font-size: 18px;
  color: var(--main);
  margin-left: 5px;
  margin-right: 5px;
}

.carform-date {
  font-size: 22px;
  font-weight: bold;
  margin: 10px 0 6px 0;
}

.carform-day {
  color: var(--muted);
  font-size: 15px;
}

/* =============== CALENDAR =============== */
.carform-calendar {
  position: absolute;
  top: 110%;
  left: 0;
  width: 100%;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, .12);
  padding: 15px;
  display: none;
  z-index: 10;
}

.carform-calendar.active {
  display: block;
}

/* Header */
.carform-cal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--main);
  color: #fff;
  padding: 8px 12px;
  border-radius: 10px;
}

.carform-cal-header i {
  cursor: pointer;
}

/* Days Row */
.carform-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  margin-top: 10px;
  text-align: center;
  font-size: 13px;
  color: #555;
}

/* Dates */
.carform-dates {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  margin-top: 10px;
}

.carform-dates span {
  padding: 10px 0;
  background: #f1f1f1;
  border-radius: 8px;
  text-align: center;
  cursor: pointer;
}

.carform-dates span:hover {
  background: var(--main);
  color: #fff;
}

.carform-dates .active {
  background: #ff5b5b;
  color: #fff;
}

/* =============== DROPDOWN =============== */
input::-webkit-calendar-picker-indicator {
  display: none !important;
}

/* =============== SEARCHABLE INPUTS & CUSTOM DROPDOWN =============== */
.carform-input-wrapper {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
}

.carform-select {
  width: 100%;
  border: none !important;
  outline: none !important;
  font-size: 20px;
  margin-top: 8px;
  background: none;
  padding: 10px 35px 10px 0;
}

[dir="rtl"] .carform-select {
  padding: 10px 0 10px 35px;
}

.carform-input-arrow {
  position: absolute;
  right: -5px;
  top: 55%;
  transform: translateY(-50%);
  cursor: pointer;
  color: #888;
  font-size: 16px;
  padding: 10px;
  z-index: 5;
  transition: all 0.3s ease;
}

[dir="rtl"] .carform-input-arrow {
  right: auto;
  left: -5px;
}

.carform-input-arrow:hover {
  color: var(--main);
  transform: translateY(-50%) scale(1.1);
}

.custom-dropdown-list {
  position: absolute;
  top: 100%;
  left: 0;
  width: 120%;
  /* wider than input */
  min-width: 280px;
  max-width: 450px;
  background: white;
  border-radius: 14px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.18);
  margin-top: 10px;
  padding: 8px 0;
  display: none;
  z-index: 9999;
  max-height: 320px;
  overflow-y: auto;
  border: 1px solid rgba(0, 0, 0, 0.05);
  animation: slideDown 0.25s cubic-bezier(0.165, 0.84, 0.44, 1);
}

[dir="rtl"] .custom-dropdown-list {
  left: auto;
  right: 0;
}

.custom-dropdown-list.active {
  display: block;
}

.custom-dropdown-item {
  padding: 12px 20px;
  cursor: pointer;
  font-size: 16px;
  color: #2c3e50;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 15px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.02);
}

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

.custom-dropdown-item:hover {
  background: #f8fbff;
  color: var(--main);
  padding-left: 28px;
}

[dir="rtl"] .custom-dropdown-item:hover {
  padding-left: 20px;
  padding-right: 28px;
}

.custom-dropdown-item i {
  color: var(--main);
  opacity: 0.7;
  font-size: 14px;
}

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

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Scrollbar Styling */
.custom-dropdown-list::-webkit-scrollbar {
  width: 6px;
}

.custom-dropdown-list::-webkit-scrollbar-track {
  background: #f1f1f1;
}

.custom-dropdown-list::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 10px;
}

.custom-dropdown-list::-webkit-scrollbar-thumb:hover {
  background: #999;
}

/* =============== CHECKBOX =============== */
.carform-checkbox-field {
  cursor: default;
}

.carform-checkbox {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
  cursor: pointer;
  user-select: none;
}

.carform-checkbox input[type="checkbox"] {
  display: none;
}

.carform-checkmark {
  width: 22px;
  height: 22px;
  border: 2px solid var(--main);
  border-radius: 6px;
  position: relative;
  transition: all 0.3s ease;
}

.carform-checkbox input[type="checkbox"]:checked+.carform-checkmark {
  background: var(--main);
}

.carform-checkbox input[type="checkbox"]:checked+.carform-checkmark::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 14px;
  font-weight: bold;
}

.carform-checkbox-text {
  font-size: 15px;
  color: #333;
}

/* =============== SUBMIT BUTTON =============== */
.carform-submit-btn {
  width: 100%;
  padding: 18px 24px;
  background: linear-gradient(135deg, var(--main) 0%, var(--main) 100%);
  color: white;
  border: none;
  border-radius: var(--radius);
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 87, 255, 0.3);
  position: relative;
  overflow: hidden;
}

.carform-submit-btn::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;
}

.carform-submit-btn:hover:not(:disabled)::before {
  left: 100%;
}

.carform-submit-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 87, 255, 0.4);
}

.carform-submit-btn:active:not(:disabled) {
  transform: translateY(0);
}

.carform-submit-btn:disabled {
  background: linear-gradient(135deg, #cccccc 0%, #999999 100%);
  cursor: not-allowed;
  opacity: 0.6;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.carform-submit-btn .btn-icon {
  font-size: 16px;
  transition: transform 0.3s ease;
}

.carform-submit-btn:hover:not(:disabled) .btn-icon {
  transform: translateX(5px);
}

/* =============== RESPONSIVE =============== */
@media(max-width:500px) {
  .carform-date {
    font-size: 18px;
  }

  .carform-submit-btn {
    font-size: 16px;
    padding: 16px 20px;
  }
}

/* =============== BOOKING POPUP REDESIGN =============== */
.booking-popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  animation: fadeIn 0.3s ease;
}

.booking-popup-overlay.active {
  display: flex;
}

.booking-popup {
  background: white;
  border-radius: 24px;
  width: 95%;
  max-width: 1000px;
  max-height: 90vh;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4);
  animation: slideUp 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  display: flex;
  flex-direction: column;
}

.booking-popup.two-column {
  max-width: 1100px;
}

@keyframes slideUp {
  from {
    transform: translateY(50px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.booking-popup-header {
  padding: 12px 25px;
  border-bottom: 1px solid #eee;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #fff;
}

.booking-popup-header h3 {
  margin: 0;
  font-size: 20px;
  color: #1a2b48;
  font-weight: 700;
}

.popup-close-btn {
  background: #f5f7fa;
  border: none;
  color: #666;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.popup-close-btn:hover {
  background: #ff5b5b;
  color: white;
  transform: rotate(90deg);
}

.booking-popup-body {
  display: flex;
  overflow-y: auto;
  flex: 1;
}

/* Left Column - Form */
.popup-left {
  flex: 1;
  padding: 20px;
  background: #f8fafc;
}

.booking-content-section {
  background: #fff;
  padding: 20px;
  border-radius: 16px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.booking-content-section h4 {
  font-size: 18px;
  color: #1a2b48;
  margin-bottom: 20px;
  font-weight: 700;
}

.personal-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.info-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.info-field.full-width {
  grid-column: span 2;
}

.info-field label {
  font-size: 13px;
  font-weight: 600;
  color: #4a5568;
}

.input-with-icon {
  position: relative;
  display: flex;
  align-items: center;
}

.input-with-icon i {
  position: absolute;
  left: 15px;
  color: var(--main);
  font-size: 16px;
}

.input-with-icon input,
.input-with-icon textarea {
  width: 100%;
  padding: 12px 15px 12px 45px;
  border: 1px solid #dce3ee;
  border-radius: 12px;
  font-size: 15px;
  color: #1a2b48;
  transition: all 0.3s ease;
  background: #fff;
}

.input-with-icon input:focus,
.input-with-icon textarea:focus {
  border-color: var(--main);
  box-shadow: 0 0 0 4px rgba(0, 87, 255, 0.05);
  outline: none;
}

.input-with-icon.textarea-icon i {
  top: 15px;
}

.input-with-icon textarea {
  min-height: 80px;
  resize: vertical;
}

.popup-actions-left.side-by-side {
  margin-top: 20px;
  display: flex;
  gap: 15px;
}

.popup-actions-left .popup-btn {
  flex: 1;
}

/* Right Column - Summary */
.popup-right {
  width: 320px;
  background: #f1f5f9;
  padding: 20px 25px;
  border-left: 1px solid #e2e8f0;
}

.booking-summary-card h4 {
  font-size: 16px;
  color: #1a2b48;
  margin-bottom: 15px;
  font-weight: 700;
  margin-right: 5px;
  margin-left: 5px
}

.summary-car-card {
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  margin-bottom: 20px;
}

.summary-car-img img {
  width: 100%;
  height: 120px;
  object-fit: cover;
}

.summary-car-info {
  padding: 10px;
}

.summary-car-info h5 {
  margin: 0 0 12px 0;
  font-size: 15px;
  color: #1a2b48;
  font-weight: 700;
  border-bottom: 1px solid #f1f5f9;
  padding-bottom: 8px;
}

.summary-car-specs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 10px;
}

.spec-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
}

.spec-item i {
  color: var(--main);
  font-size: 14px;
  background: #f0f7f5;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  transition: all 0.3s ease;
}

/* Nested Order Info */
.summary-order-nested {
  background: #f8fafc;
  border-radius: 8px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}

.summary-order-nested .sum-row {
  font-size: 12px;
  padding-bottom: 0;
}

.compact-sum-details {
  padding: 10px 5px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.spec-item:hover i {
  background: var(--main);
  color: #fff;
  transform: translateY(-2px);
}

.spec-item span {
  font-size: 11px;
  color: #4a5568;
  font-weight: 700;
}

.order-info-section h6 {
  font-size: 14px;
  color: #1a2b48;
  font-weight: 700;
  margin: 30px 0 15px 0;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  border-left: 4px solid var(--main);
  padding-left: 10px;
}

.summary-details {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: #fff;
  padding: 15px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

.sum-row {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  padding-bottom: 5px;
}

.sum-label {
  color: #718096;
}

.sum-value {
  color: #1a2b48;
  font-weight: 700;
}

.summary-price-section.compact {
  margin: 10px 0 15px 0;
  padding: 12px 15px;
  background: linear-gradient(135deg, var(--main) 0%, var(--main) 100%);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: white;
  box-shadow: 0 4px 15px rgba(0, 87, 255, 0.2);
  gap: 2px;
}

.summary-price-section.compact .label {
  font-size: 11px;
  margin-bottom: 0;
  opacity: 0.9;
}

.summary-price-section.compact .amount {
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.spec-item i {
  color: var(--main);
  font-size: 14px;
  background: #f0f7f5;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  transition: all 0.3s ease;
}

.price-display {
  text-align: center;
}

.spec-item:hover i {
  background: var(--main);
  color: #fff;
  transform: translateY(-2px);
}

.popup-btn:disabled {
  filter: grayscale(1);
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

/* Base Popup Button Style (Matching Main Page) */
.popup-btn {
  padding: 15px 25px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
  position: relative;
  overflow: hidden;
  width: 100%;
}

.popup-btn::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;
}

.popup-btn:hover:not(:disabled)::before {
  left: 100%;
}

.popup-btn:hover:not(:disabled) {
  transform: translateY(-2px);
}

.popup-btn i {
  transition: transform 0.3s ease;
}

.popup-btn:hover:not(:disabled) i {
  transform: scale(1.2);
}

.popup-btn-confirm:hover:not(:disabled) i {
  transform: translateX(3px) scale(1.1);
}


.popup-btn-confirm {
  background: linear-gradient(135deg, var(--main) 0%, var(--main) 100%);
  color: #fff;
  box-shadow: 0 4px 15px rgba(0, 87, 255, 0.3);
}

.popup-btn-confirm:hover:not(:disabled) {
  box-shadow: 0 6px 20px rgba(0, 87, 255, 0.4);
}

.popup-btn-cancel {
  background: #fff;
  color: #ef4444;
  border: 1px solid #fecaca;
}

.popup-btn-cancel:hover:not(:disabled) {
  background: #fff5f5;
  border-color: #f87171;
  color: #dc2626;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.1);
}


/* Success Message Overlay - Compact & Smooth */
.booking-success-message {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -40%);
  width: 90%;
  max-width: 320px;
  background: white;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  border-radius: 20px;
  text-align: center;
  padding: 30px 20px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
  opacity: 0;
  visibility: hidden;
  transition: all 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.booking-success-message.active {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%);
}

.booking-success-message.fade-out {
  opacity: 0;
  transform: translate(-50%, -60%);
}

.success-icon {
  font-size: 50px;
  /* Smaller icon */
  color: var(--main);
  margin-bottom: 15px;
}

.booking-success-message p {
  font-size: 15px;
  line-height: 1.5;
  color: #1a2b48;
  font-weight: 500;
  margin: 0;
}

/* Responsive */
@media(max-width: 900px) {
  .booking-popup-body {
    flex-direction: column;
  }

  .popup-right {
    width: 100%;
    border-left: none;
    border-top: 1px solid #eee;
  }

  .personal-info-grid {
    grid-template-columns: 1fr;
  }

  .info-field.full-width {
    grid-column: span 1;
  }
}