/**
 * Rent.it Search Form Styles
 */

:root {
  --rent-it-orange: #ff6b00;
  --rent-it-orange-hover: #e65c00;
  --rent-it-bg: #f8f9fa;
  --rent-it-text: #1a1a1a;
  --rent-it-text-muted: #6b7280;
  --rent-it-border: #d1d5db;
  --rent-it-input-height: 3.5rem;
  --rent-it-radius: 0.5rem;
}

/* Wrapper */
.rent-it-search-wrapper {
  max-width: 1200px;
  margin: 0 auto;
}

/* Form */
.rent-it-form {
  background: var(--rent-it-bg);
  border-radius: var(--rent-it-radius);
  padding: 1.5rem;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

/* Title */
.rent-it-title {
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--rent-it-text);
  margin: 0 0 1rem 0;
}

/* Grid Layout */
.rent-it-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

@media (min-width: 1024px) {
  .rent-it-grid {
    grid-template-columns: repeat(12, 1fr);
  }
  
  .rent-it-field-location {
    grid-column: span 4;
  }
  
  .rent-it-field-date {
    grid-column: span 2;
  }
  
  .rent-it-field-time {
    grid-column: span 1;
  }
  
  .rent-it-field-button {
    grid-column: span 2;
    display: flex;
    align-items: flex-end;
  }
}

/* Labels */
.rent-it-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--rent-it-text-muted);
  margin-bottom: 0.25rem;
}

/* Input wrapper */
.rent-it-input-wrapper {
  display: flex;
  align-items: center;
  background: white;
  border: 1px solid var(--rent-it-border);
  border-radius: var(--rent-it-radius);
  height: var(--rent-it-input-height);
  padding: 0 0.75rem;
  transition: all 0.2s ease;
}

.rent-it-input-wrapper:focus-within {
  border-color: var(--rent-it-orange);
  box-shadow: 0 0 0 2px rgba(255, 107, 0, 0.2);
}

/* Icon */
.rent-it-icon {
  width: 1.25rem;
  height: 1.25rem;
  color: var(--rent-it-text-muted);
  margin-right: 0.5rem;
  flex-shrink: 0;
}

/* Input */
.rent-it-input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--rent-it-text);
  background: transparent;
  min-width: 0;
}

.rent-it-input::placeholder {
  color: var(--rent-it-text-muted);
}

/* Location Combobox */
.rent-it-location-combobox {
  position: relative;
}

.rent-it-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 1px solid var(--rent-it-border);
  border-radius: var(--rent-it-radius);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  max-height: 15rem;
  overflow-y: auto;
  z-index: 100;
  margin-top: 0.25rem;
}

.rent-it-option {
  padding: 0.75rem;
  cursor: pointer;
  transition: background 0.15s ease;
}

.rent-it-option:hover,
.rent-it-option.selected {
  background: #e0f2fe;
}

.rent-it-option-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--rent-it-text);
}

.rent-it-option-country {
  font-size: 0.75rem;
  color: var(--rent-it-text-muted);
}

.rent-it-no-results {
  padding: 0.75rem;
  font-size: 0.875rem;
  color: var(--rent-it-text-muted);
}

/* Button */
.rent-it-button {
  width: 100%;
  height: var(--rent-it-input-height);
  background: var(--rent-it-orange);
  color: white;
  border: none;
  border-radius: var(--rent-it-radius);
  font-size: 1.125rem;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
}

.rent-it-button:hover:not(:disabled) {
  background: var(--rent-it-orange-hover);
}

.rent-it-button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

/* Options */
.rent-it-options {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  font-size: 0.875rem;
  color: var(--rent-it-text);
}

.rent-it-checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}

.rent-it-checkbox {
  width: 1.25rem;
  height: 1.25rem;
  accent-color: var(--rent-it-orange);
  cursor: pointer;
}

/* Extra fields for driver age/country */
.rent-it-extra-fields {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  animation: fadeIn 0.2s ease;
}

.rent-it-inline-field {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.rent-it-inline-label {
  font-weight: 500;
}

.rent-it-small-input {
  width: 4rem;
  padding: 0.25rem 0.5rem;
  border: 1px solid var(--rent-it-border);
  border-radius: 0.25rem;
  font-size: 0.875rem;
}

.rent-it-select {
  max-width: 12rem;
  padding: 0.25rem 0.5rem;
  border: 1px solid var(--rent-it-border);
  border-radius: 0.25rem;
  font-size: 0.875rem;
}

/* Drop off location */
.rent-it-dropoff-location {
  margin-top: 1rem;
  max-width: 24rem;
  animation: fadeIn 0.2s ease;
}

/* Loading/Error states */
.rent-it-loading-state,
.rent-it-error-state {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 2rem;
}

.rent-it-error-state {
  color: #dc2626;
}

/* Spinner */
.rent-it-spinner {
  width: 1.5rem;
  height: 1.5rem;
  border: 2px solid var(--rent-it-border);
  border-top-color: var(--rent-it-orange);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.rent-it-spinner-small {
  width: 1.25rem;
  height: 1.25rem;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* Animations */
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-0.5rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Loading placeholder */
.rent-it-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 2rem;
  background: var(--rent-it-bg);
  border-radius: var(--rent-it-radius);
}

