/* ============================================
   Forms
   ============================================ */

   .form__label {
    display: block;
    margin-bottom: var(--space-sm);
    color: var(--color-text-secondary);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
  }
  
  .form__input,
  .form__select,
  .form__textarea {
    width: 100%;
    min-height: 44px;
    padding: 12px 16px;
    color: var(--color-text);
    background-color: var(--color-bg-secondary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    font-size: var(--font-size-base);
    transition:
      border-color var(--transition-base),
      background-color var(--transition-base),
      box-shadow var(--transition-base);
  }
  
  .form__input:focus,
  .form__select:focus,
  .form__textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(0, 156, 67, 0.1);
  }
  
  .form__input:disabled,
  .form__select:disabled,
  .form__textarea:disabled {
    cursor: not-allowed;
    opacity: 0.6;
  }
  
  .form__select {
    padding-right: 40px;
    appearance: none;
    -webkit-appearance: none;
    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 16px center;
  }
  
  .form__textarea {
    min-height: 120px;
    resize: vertical;
  }
  
  /* Toggle Switch */
  .toggle {
    position: relative;
    flex-shrink: 0;
    width: 56px;
    height: 32px;
    padding: 0;
    cursor: pointer;
    background-color: #d1d5db;
    border: 0;
    border-radius: var(--radius-full);
    transition: background-color var(--transition-base);
  }
  
  .toggle--active {
    background-color: var(--color-primary);
  }
  
  .toggle:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 3px;
  }
  
  .toggle:disabled,
  .toggle[aria-disabled="true"] {
    cursor: not-allowed;
    opacity: 0.55;
  }
  
  .toggle__handle {
    position: absolute;
    top: 4px;
    left: 4px;
    width: 24px;
    height: 24px;
    background-color: #fff;
    border-radius: 50%;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-base);
  }
  
  .toggle--active .toggle__handle {
    transform: translateX(24px);
  }
  
  /* Range slider */
  .range {
    width: 100%;
    height: 8px;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background: #e5e7eb;
    border-radius: var(--radius-full);
    outline: none;
  }
  
  .range:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 4px;
  }
  
  .range:disabled {
    cursor: not-allowed;
    opacity: 0.55;
  }
  
  .range::-webkit-slider-thumb {
    width: 20px;
    height: 20px;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background: var(--color-primary);
    border: 2px solid #fff;
    border-radius: 50%;
    box-shadow: var(--shadow-md);
    transition: transform var(--transition-fast);
  }
  
  .range::-webkit-slider-thumb:hover {
    transform: scale(1.15);
  }
  
  .range::-moz-range-track {
    height: 8px;
    background: #e5e7eb;
    border: 0;
    border-radius: var(--radius-full);
  }
  
  .range::-moz-range-thumb {
    width: 20px;
    height: 20px;
    cursor: pointer;
    background: var(--color-primary);
    border: 2px solid #fff;
    border-radius: 50%;
    box-shadow: var(--shadow-md);
  }
  
  /* Newsletter inline form */
  .newsletter {
    display: flex;
    align-items: stretch;
    gap: 10px;
    width: 100%;
    max-width: 340px;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .newsletter-consent-modal__checkbox {
    margin: var(--space-md) 0;
    text-align: left;
  }

  .newsletter-consent-modal__error {
    margin: 0 0 var(--space-md);
    color: var(--color-error);
    font-size: var(--font-size-sm);
    line-height: var(--line-height-relaxed);
  }

  .newsletter-consent-modal__actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    justify-content: center;
  }

  .newsletter-consent-modal__actions .btn {
    min-width: 8.5rem;
  }

  .form-consent {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0;
    color: var(--color-text-secondary);
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-medium);
    line-height: var(--line-height-relaxed);
    cursor: pointer;
  }

  .form-consent input[type="checkbox"] {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    margin-top: 2px;
    accent-color: var(--color-primary);
    cursor: pointer;
  }

  .form-consent a {
    color: var(--color-primary);
    font-weight: var(--font-weight-semibold);
    text-decoration: underline;
  }

  .form-consent--footer {
    max-width: 340px;
    color: rgb(255 255 255 / 0.78);
  }

  .form-consent--footer a {
    color: #fff;
  }

  .form-consent--light {
    color: rgb(255 255 255 / 0.92);
  }

  .form-consent--light a {
    color: #fff;
  }

  .form-consent--invalid,
  .form-consent.contact-page-form__field--invalid,
  .form-consent.contact-modal__field--invalid {
    color: var(--color-error);
  }

  .contact-page-form__error,
  .contact-modal__error {
    display: block;
    margin-top: 6px;
    font-size: var(--font-size-xs);
    line-height: var(--line-height-relaxed);
  }
  
  .newsletter__input {
    flex: 1;
    min-width: 0;
    min-height: 48px;
    padding: 12px 16px;
    color: var(--color-text);
    background-color: #fff;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    font-size: var(--font-size-sm);
    transition:
      border-color var(--transition-base),
      box-shadow var(--transition-base);
  }
  
  .newsletter__input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(0, 156, 67, 0.12);
  }
  
  .newsletter__input:disabled {
    cursor: not-allowed;
    opacity: 0.6;
  }
  
  .newsletter__input::placeholder {
    color: #9ca3af;
  }
  
  .newsletter__btn {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 48px;
    min-width: 48px;
    min-height: 48px;
    padding: 0;
    color: #fff;
    cursor: pointer;
    background: var(--color-primary);
    border: 0;
    border-radius: 10px;
    transition: background-color var(--transition-base);
  }
  
  .newsletter__btn:hover,
  .newsletter__btn:active,
  .newsletter__btn:focus-visible {
    background: var(--color-primary-dark);
  }
  
  .newsletter__btn:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
  }
  
  .newsletter__btn:disabled,
  .newsletter__btn[aria-disabled="true"] {
    cursor: not-allowed;
    opacity: 0.55;
    pointer-events: none;
  }
  
  .newsletter__btn svg {
    width: 20px;
    height: 20px;
  }
  
  @media (prefers-reduced-motion: reduce) {
    .form__input,
    .form__select,
    .form__textarea,
    .toggle,
    .toggle__handle,
    .range::-webkit-slider-thumb,
    .newsletter__input,
    .newsletter__btn {
      transition: none;
    }
  
    .range::-webkit-slider-thumb:hover {
      transform: none;
    }
  }