/* TFH Rent-a-Car Booking Form
   Matches nn-rentacar-theme design system */

.tfh-booking-wrap {
  max-width: 900px;
  margin: 0 auto 40px;
  font-family: inherit;
}

/* -- Section blocks -- */
.tfh-section {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, .1);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 20px;
}

.tfh-section legend {
  font-size: 1.15rem;
  font-weight: 700;
  color: #1b1b1b;
  padding: 0 8px;
}

/* -- Vehicle info card -- */
.tfh-vehicle-info {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}

.tfh-vehicle-image {
  flex: 0 0 280px;
}

.tfh-vehicle-image img {
  width: 100%;
  height: auto;
  border-radius: 10px;
  object-fit: cover;
}

.tfh-vehicle-details {
  flex: 1;
}

.tfh-vehicle-title {
  margin: 0 0 12px;
  font-size: 1.5rem;
  font-weight: 700;
  color: #1b1b1b;
}

.tfh-vehicle-specs {
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}

.tfh-vehicle-specs li {
  font-size: 0.95rem;
  color: #333;
}

.tfh-vehicle-specs strong {
  color: #1b1b1b;
}

/* -- Price table -- */
.tfh-price-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.tfh-price-table th,
.tfh-price-table td {
  padding: 8px 10px;
  text-align: center;
  border: 1px solid rgba(0, 0, 0, .1);
}

.tfh-price-table thead th {
  background: #f5f5f5;
  font-weight: 600;
  color: #1b1b1b;
}

.tfh-price-table tbody td {
  font-weight: 600;
  color: #C69B3C;
}

/* -- Form fields -- */
.tfh-form-row {
  display: grid;
  gap: 16px;
  margin-bottom: 16px;
}

.tfh-form-row--2col { grid-template-columns: 1fr 1fr; }
.tfh-form-row--4col { grid-template-columns: 1fr 1fr 1fr 1fr; }

.tfh-field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: #333;
  margin-bottom: 6px;
}

.tfh-field label .required {
  color: #c0392b;
}

.tfh-field input,
.tfh-field select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 0.95rem;
  background: #fff;
  color: #1b1b1b;
  transition: border-color 0.2s;
  box-sizing: border-box;
}

.tfh-field input:focus,
.tfh-field select:focus {
  outline: none;
  border-color: #C69B3C;
  box-shadow: 0 0 0 2px rgba(198, 155, 60, .2);
}

.tfh-field--error input,
.tfh-field--error select {
  border-color: #c0392b;
  box-shadow: 0 0 0 2px rgba(192, 57, 43, .15);
}

/* -- Price calculation box -- */
.tfh-price-calc {
  background: #faf8f4;
  border-color: #C69B3C;
}

.tfh-price-placeholder,
.tfh-price-loading {
  text-align: center;
  padding: 12px;
  color: #888;
  font-style: italic;
}

.tfh-price-summary {
  padding: 4px 0;
}

.tfh-price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid rgba(0, 0, 0, .06);
}

.tfh-price-row:last-child {
  border-bottom: none;
}

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

.tfh-price-amount {
  color: #C69B3C;
  font-size: 1.3rem;
}

.tfh-price-deposit {
  font-size: 0.9rem;
  color: #666;
}

.tfh-price-error {
  text-align: center;
  padding: 12px;
  color: #c0392b;
}

/* -- Errors -- */
.tfh-errors {
  display: none;
  background: #fdf0f0;
  border: 1px solid #e8b4b4;
  border-radius: 8px;
  padding: 16px 20px;
  margin-bottom: 16px;
  color: #c0392b;
}

.tfh-errors ul {
  margin: 0;
  padding: 0 0 0 18px;
}

.tfh-errors li {
  margin-bottom: 4px;
}

/* -- Notices -- */
.tfh-notice {
  padding: 20px 24px;
  border-radius: 10px;
  text-align: center;
}

.tfh-notice--info {
  background: #f0f4fa;
  border: 1px solid #b8cce8;
  color: #2c3e50;
}

.tfh-notice--error {
  background: #fdf0f0;
  border: 1px solid #e8b4b4;
  color: #c0392b;
}

.tfh-notice a {
  color: #C69B3C;
  font-weight: 600;
}

/* -- Submit button -- */
.tfh-submit-wrap {
  text-align: center;
  padding: 8px 0;
}

.tfh-btn--primary {
  display: inline-block;
  background: #C69B3C;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 14px 48px;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  transition: filter 0.2s, transform 0.2s;
  letter-spacing: 0.3px;
}

.tfh-btn--primary:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.tfh-btn--primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* -- Responsive -- */
@media (max-width: 768px) {
  .tfh-vehicle-info {
    flex-direction: column;
  }

  .tfh-vehicle-image {
    flex: none;
    width: 100%;
  }

  .tfh-form-row--2col { grid-template-columns: 1fr; }
  .tfh-form-row--4col { grid-template-columns: 1fr 1fr; }

  .tfh-section {
    padding: 16px;
  }
}

@media (max-width: 480px) {
  .tfh-form-row--4col { grid-template-columns: 1fr; }

  .tfh-btn--primary {
    width: 100%;
    padding: 14px 20px;
  }
}

/* Flatpickr */
.flatpickr-calendar {
  z-index: 100100 !important;
  font-family: inherit;
  border-radius: 10px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

.tfh-field .flatpickr-input,
.tfh-field input.flatpickr-input {
  width: 100%;
  cursor: pointer;
}

.tfh-field input.tfh-js-datepicker,
.tfh-field input.tfh-js-timepicker {
  cursor: pointer;
}

.tfh-field--radios .tfh-field-label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.tfh-field--radios .tfh-inline {
  display: inline-block;
  margin-right: 1.25rem;
  font-weight: 500;
}

.tfh-form-row--custom .tfh-field--custom {
  margin-bottom: 1rem;
}
