/* ============================================
   DELIVERY FORM - Compact Style
   ============================================ */

.delivery-widget {
  max-width: 540px;
  margin: 1.5vh auto;
  padding: var(--space-lg, 1.25rem);
  background: var(--bg-primary, #FDFBF7);
  border: 1px solid var(--bg-tertiary, #EDE6DA);
  border-radius: var(--radius-lg, 12px);
  box-shadow: 0 4px 20px var(--shadow-soft, rgba(45, 41, 38, 0.08));
}

.delivery-widget h2 {
  font-family: var(--font-heading, 'Playfair Display', Georgia, serif);
  text-align: center;
  margin-bottom: var(--space-md, 0.6rem);
  color: var(--text-primary, #2D2926);
  font-weight: 600;
  font-size: 1.4rem;
}

/* ============================================
   FORM LAYOUT - Compact
   ============================================ */

.reservation-form.single-column {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-sm, 0.5rem);
}

.reservation-form.two-column {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-sm, 0.5rem);
}

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

/* ============================================
   FORM FIELDS - Compact
   ============================================ */

.field {
  display: flex;
  align-items: center;
  gap: var(--space-sm, 0.5rem);
  background: var(--bg-secondary, #F5F0E8);
  padding: var(--space-sm, 0.5rem) var(--space-md, 1rem);
  border-radius: var(--radius-md, 8px);
  border: 1px solid var(--bg-tertiary, #EDE6DA);
  transition: all var(--transition-fast, 150ms ease);
}

.field:hover {
  border-color: var(--brand-gold-light, #E5D4A4);
}

.field:focus-within {
  border-color: var(--brand-gold, #C9A456);
}

.field i {
  font-size: 1rem;
  color: var(--brand-gold, #C9A456);
  width: 20px;
  text-align: center;
}

.field-input {
  flex: 1;
  min-width: 0;
}

.field-input label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 0;
  color: var(--text-secondary, #5C5550);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.field-input input,
.field-input textarea,
.field-input select {
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--bg-tertiary, #EDE6DA);
  color: var(--text-primary, #2D2926);
  font-size: 1rem;
  font-family: var(--font-body, inherit);
  width: 100%;
  padding: 0.3rem 0;
}

.field-input input:focus,
.field-input textarea:focus,
.field-input select:focus {
  outline: none;
  border-bottom-color: var(--brand-gold, #C9A456);
}

/* City select dropdown */
.field-input select.delivery-city-select {
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23C9A456' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.5rem center;
  padding-right: 2rem;
}

html[lang="he"] .field-input select.delivery-city-select {
  background-position: left 0.5rem center;
  padding-right: 0;
  padding-left: 2rem;
}

.field-input input::placeholder,
.field-input textarea::placeholder {
  color: var(--text-muted, #8B857D);
}

.field-input textarea {
  resize: vertical;
  min-height: 40px;
  max-height: 80px;
}

/* ============================================
   SUBMIT BUTTON - Compact
   ============================================ */

.reservation-submit {
  grid-column: 1 / -1;
  padding: var(--space-sm, 0.75rem);
  background: linear-gradient(135deg, var(--brand-gold, #C9A456), var(--brand-gold-dark, #A68736));
  border: none;
  border-radius: var(--radius-md, 8px);
  font-size: 1rem;
  font-weight: 600;
  color: white;
  cursor: pointer;
  transition: all var(--transition-fast, 150ms ease);
  margin-top: var(--space-sm, 0.4rem);
}

.reservation-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(201, 164, 86, 0.4);
}

/* ============================================
   MOBILE
   ============================================ */

@media (max-width: 768px) {
  .delivery-widget {
    margin: var(--space-sm, 0.5rem);
    padding: var(--space-sm, 0.75rem);
  }

  .delivery-widget h2 {
    font-size: 1.1rem;
    margin-bottom: var(--space-sm, 0.5rem);
  }

  .reservation-form.two-column {
    grid-template-columns: 1fr;
  }

  .field {
    padding: var(--space-xs, 0.4rem) var(--space-sm, 0.5rem);
  }

  .field-input input,
  .field-input textarea {
    font-size: 16px !important;
  }

  .reservation-submit {
    padding: var(--space-sm, 0.6rem);
    min-height: 40px;
  }
}

/* ============================================
   RTL (Hebrew)
   ============================================ */

html[lang="he"] .delivery-widget {
  direction: rtl;
}

html[lang="he"] .field {
  flex-direction: row-reverse;
}

html[lang="he"] .field-input {
  text-align: right;
}

html[lang="he"] .field-input label {
  text-align: right;
}

/* ============================================
   STREET AUTOCOMPLETE
   ============================================ */

.street-autocomplete-wrapper {
  position: relative;
}

.street-autocomplete-list {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  max-height: 200px;
  overflow-y: auto;
  background: white;
  border: 1px solid var(--brand-gold, #C9A456);
  border-top: none;
  border-radius: 0 0 var(--radius-md, 8px) var(--radius-md, 8px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 100;
  display: none;
}

.street-autocomplete-list.active {
  display: block;
}

.street-autocomplete-item {
  padding: 0.6rem 1rem;
  cursor: pointer;
  border-bottom: 1px solid var(--bg-tertiary, #EDE6DA);
  font-size: 0.95rem;
  color: var(--text-primary, #2D2926);
  transition: background-color 0.15s ease;
}

.street-autocomplete-item:last-child {
  border-bottom: none;
}

.street-autocomplete-item:hover,
.street-autocomplete-item.selected {
  background-color: var(--bg-secondary, #F5F0E8);
}

.street-autocomplete-item mark {
  background-color: var(--brand-gold-light, #E5D4A4);
  color: inherit;
  padding: 0;
}

/* Fuzzy match indicator */
.street-autocomplete-item--fuzzy {
  font-style: italic;
  color: var(--text-secondary, #5C5550);
}

html[lang="he"] .street-autocomplete-list {
  text-align: right;
}
