/* ==========================================================================
   05-forms.css — Form Elements & Rental Request Form
   ========================================================================== */

/* Labels */
label {
  display: block;
  margin-bottom: var(--rentl-space-2);
  color: var(--rentl-color-heading);
  font-weight: 700;
  font-size: var(--rentl-font-size-sm);
}

/* All text-like inputs */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="date"],
input[type="number"],
input[type="search"],
input[type="url"],
textarea,
select {
  display: block;
  width: 100%;
  min-height: 48px;
  padding: 0.7rem var(--rentl-space-4);
  border: 1px solid var(--rentl-color-border-strong);
  border-radius: var(--rentl-radius-sm);
  background-color: var(--rentl-color-surface);
  color: var(--rentl-color-text);
  font-family: var(--font-body);
  font-size: var(--rentl-font-size-base);
  line-height: var(--rentl-line-height-body);
  transition: border-color var(--rentl-transition-fast), box-shadow var(--rentl-transition-fast);
  appearance: none;
  -webkit-appearance: none;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="date"]:focus,
input[type="number"]:focus,
input[type="search"]:focus,
input[type="url"]:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--rentl-orange);
  box-shadow: 0 0 0 3px rgba(255, 87, 0, 0.15);
}

input::placeholder,
textarea::placeholder {
  color: var(--rentl-color-text-muted);
}

/* Textarea */
textarea {
  min-height: 9rem;
  resize: vertical;
  padding-top: var(--rentl-space-3);
}

/* Select */
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2.5rem;
}

/* Checkboxes & radios */
input[type="checkbox"],
input[type="radio"] {
  min-height: unset;
  width: auto;
  accent-color: var(--rentl-orange);
}

/* Form field wrapper */
.rentl-form-field {
  margin-bottom: var(--rentl-space-5);
}

.rentl-form-field:last-child {
  margin-bottom: 0;
}

/* Form row */
.rentl-form-row {
  display: grid;
  gap: var(--rentl-space-4);
  grid-template-columns: 1fr;
}

@media (min-width: 700px) {
  .rentl-form-row--2 {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Help text */
.rentl-form-help {
  display: block;
  margin-top: var(--rentl-space-1);
  font-size: var(--rentl-font-size-sm);
  color: var(--rentl-color-text-muted);
}

/* Error text */
.rentl-form-error {
  display: block;
  margin-top: var(--rentl-space-1);
  font-size: var(--rentl-font-size-sm);
  font-weight: 700;
  color: var(--rentl-color-error);
}

/* Invalid state */
input.is-invalid,
textarea.is-invalid,
select.is-invalid {
  border-color: var(--rentl-color-error);
  box-shadow: 0 0 0 3px var(--rentl-color-error-bg);
}

/* Honeypot — always hidden */
.rentl-hp {
  display: none !important;
}

/* Form response messages */
.rentl-form-response {
    margin-top: var(--rentl-space-4);
    padding: var(--rentl-space-4) var(--rentl-space-5);
    border-radius: var(--rentl-radius);
    font-size: var(--rentl-font-size-sm);
    font-weight: 600;
    display: none;
}

.rentl-form-response:not(:empty) {
    display: block;
}

.rentl-form-response--success {
    background: rgba(16, 185, 129, 0.10);
    border: 1px solid rgba(16, 185, 129, 0.30);
    color: var(--rentl-color-available);
}

.rentl-form-response--error {
    background: var(--rentl-color-error-bg);
    border: 1px solid rgba(220, 38, 38, 0.25);
    color: var(--rentl-color-error);
}
