/**
 * SFEIR 2026 — HubSpot Forms CSS
 * Design system: The Sharp Artisan
 * Fonts: Epilogue (headings) + Space Grotesk (body/labels)
 * Primary color: #845400 (Cuivre Poli)
 */

/* ==========================================================================
   Base form wrapper
   ========================================================================== */

.sfeir-hubspot-form {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  width: 100%;
  background: transparent;
}

.sfeir-hubspot-form .hs-form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  animation: hs-fade-in 0.3s ease-in-out;
}

/* ==========================================================================
   Labels
   ========================================================================== */

.sfeir-hubspot-form .hs-form-field > label {
  display: block;
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-weight: 500;
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #1B1B1B;
  margin-bottom: 0.5rem;
}

.sfeir-hubspot-form .hs-form-required {
  color: #BA1A1A;
}

/* ==========================================================================
   Inputs
   ========================================================================== */

.sfeir-hubspot-form .hs-input {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-size: 1rem;
  width: 100%;
  padding: 0.75rem 1rem;
  background: #FFFFFF;
  border: 1px solid #D6C3B1;
  color: #1B1B1B;
  outline: none;
  transition: border-color 0.2s ease;
  box-sizing: border-box;
  border-radius: 0;
}

.sfeir-hubspot-form .hs-input:focus {
  border-color: #845400;
}

.sfeir-hubspot-form .hs-input:hover {
  border-color: #847564;
}

.sfeir-hubspot-form .hs-input::placeholder {
  color: transparent;
  opacity: 0;
}

.sfeir-hubspot-form .hs-input.error,
.sfeir-hubspot-form .hs-input.invalid {
  border-color: #BA1A1A;
}

/* ==========================================================================
   Textarea
   ========================================================================== */

.sfeir-hubspot-form textarea.hs-input {
  min-height: 120px;
  resize: vertical;
}

/* ==========================================================================
   Select
   ========================================================================== */

.sfeir-hubspot-form select.hs-input {
  appearance: none;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%23514536' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
  background-position: right 1rem center;
  background-repeat: no-repeat;
  background-size: 1.25em 1.25em;
  padding-right: 2.5rem;
}

/* ==========================================================================
   Fieldset / columns layout
   ========================================================================== */

.sfeir-hubspot-form fieldset {
  border: none;
  padding: 0;
  margin: 0;
  width: 100%;
}

.sfeir-hubspot-form fieldset.form-columns-1 .hs-input {
  width: 100%;
}

.sfeir-hubspot-form .form-columns-2 {
  display: flex;
  gap: 1rem;
}

.sfeir-hubspot-form .form-columns-2 .hs-form-field {
  flex: 1;
}

@media (max-width: 640px) {
  .sfeir-hubspot-form .form-columns-2 {
    flex-direction: column;
  }
}

/* ==========================================================================
   Checkbox
   ========================================================================== */

.sfeir-hubspot-form .hs-form-checkbox-display {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.sfeir-hubspot-form .hs-input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
  margin-top: 0.2rem;
  flex-shrink: 0;
  accent-color: #845400;
}

/* ==========================================================================
   Submit button
   ========================================================================== */

.sfeir-hubspot-form .hs-button {
  font-family: 'Epilogue', system-ui, sans-serif;
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  width: 100%;
  padding: 1rem 2rem;
  background: #845400;
  color: #FFFFFF;
  border: none;
  cursor: pointer;
  transition: background-color 0.2s ease;
  border-radius: 0;
}

.sfeir-hubspot-form .hs-button:hover {
  background: #5D3A00;
}

.sfeir-hubspot-form .hs-button:disabled {
  background: #D6C3B1;
  cursor: not-allowed;
  opacity: 0.7;
}

/* ==========================================================================
   Error messages
   ========================================================================== */

.sfeir-hubspot-form .hs-error-msg {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-size: 0.8125rem;
  color: #BA1A1A;
  margin-top: 0.25rem;
  display: block;
}

.sfeir-hubspot-form .hs-form-field.hs-form-field-error .hs-input {
  border-color: #BA1A1A;
}

/* ==========================================================================
   Legal / GDPR richtext
   ========================================================================== */

.sfeir-hubspot-form .hs-richtext {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-size: 0.8125rem;
  color: #514536;
  line-height: 1.6;
}

.sfeir-hubspot-form .hs-richtext a {
  color: #845400;
  text-decoration: underline;
}

.sfeir-hubspot-form .legal-consent-container {
  margin-top: 0.5rem;
}

/* ==========================================================================
   Dark theme (event forms on dark backgrounds)
   ========================================================================== */

.sfeir-hubspot-form.dark-theme .hs-form-field > label,
.sfeir-hubspot-form.dark-theme .hs-form-field > label span {
  color: rgba(255, 255, 255, 0.9);
}

.sfeir-hubspot-form.dark-theme .hs-form-required {
  color: #ff9999;
}

.sfeir-hubspot-form.dark-theme .hs-richtext {
  color: rgba(255, 255, 255, 0.75);
}

.sfeir-hubspot-form.dark-theme .hs-richtext a {
  color: #FFB95C;
}

.sfeir-hubspot-form.dark-theme .hs-error-msg {
  color: #ff9999;
}

/* ==========================================================================
   Success message (after form submission)
   ========================================================================== */

.hs-event-success {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 2.5rem 2rem;
  text-align: center;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  animation: hs-fade-in 0.4s ease-out;
}

.hs-event-success__icon {
  width: 3rem;
  height: 3rem;
  color: #E5A040;
}

.hs-event-success__message {
  font-family: 'Epilogue', system-ui, sans-serif;
  font-size: 1.125rem;
  font-weight: 600;
  color: #F1F1F1;
}

/* Light background variant */
.hs-event-success--light {
  background: #F3F3F3;
  border-color: #D6C3B1;
}

.hs-event-success--light .hs-event-success__icon {
  color: #845400;
}

.hs-event-success--light .hs-event-success__message {
  color: #1B1B1B;
}

/* ==========================================================================
   Animations
   ========================================================================== */

@keyframes hs-fade-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
