/* ============================================
   hoopla Vendor Form Styles
   ============================================ */

:root {
	--color-text-1: #292E3D;
  --color-text-2: #606880;
}

.hoopla-vendor-form-wrapper {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 0;
}

/* ---------- Form grid layout ---------- */

.hoopla-vendor-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem 1.5rem;
}

/* Full-width fields */
.hvf-checkbox-group,
.hvf-submit,
.hvf-hp,
.hoopla-vendor-form .hvf-privacy {
  grid-column: 1 / -1;
}

/* ---------- Fields ---------- */

.hvf-field {
  display: flex;
  flex-direction: column;
}

.hvf-field label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 0.25rem;
  color: var(--color-text-1);
  letter-spacing: 0.01em;
}

.hvf-asterisk {
  color: #d63638;
}

.hvf-field input[type="text"],
.hvf-field input[type="email"],
.hvf-field input[type="url"] {
  display: block;
  width: 100%;
  padding: 13px 15px;
  font-size: 16px;
  color: var(--color-text-2);
  background: #f9f9fb;
  border: 1px solid #313749;
  border-radius: 16px;
  box-sizing: border-box;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.hvf-field input::placeholder {
  color: #aaa;
}

.hvf-field input:focus {
  outline: none;
  border-color: #3a3af4;
  box-shadow: 0 0 0 2px rgba(58, 58, 244, 0.12);
}

/* ---------- Invalid state ---------- */

.hvf-field input.hvf-invalid {
  border-color: #d63638;
}

.hvf-checkbox-group.hvf-invalid .hvf-checkboxes {
  outline: 1px solid #d63638;
  outline-offset: 4px;
  border-radius: 4px;
}

.hvf-error {
  display: none;
  font-size: 0.75rem;
  color: #d63638;
  margin-top: 0.25rem;
}

/* ---------- Checkbox pills ---------- */

.hvf-checkbox-group > label:first-of-type {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-text-1);
  margin-bottom: 0.5rem;
}

.hvf-checkboxes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.hvf-checkbox-label {
  display: inline-flex;
  align-items: center;
  font-weight: normal !important;
  font-size: 16px;
  color: var(--color-text-2);
  cursor: pointer;
  padding: 13px 15px;
  border: 1.5px solid #313749;
  border-radius: 16px;
  background: #eee;
  transition: all 0.15s ease;
  user-select: none;
  gap: 0.375rem;
}

.hvf-checkbox-label:hover {
  border-color: #3a3af4;
  color: #3a3af4;
}

/* Circle indicator */
.hvf-checkbox-label span::before {
  content: '✓';
  font-size: 11px;
  font-weight: 700;
  text-align: center;
  line-height: 18px;
  color: white;
  display: inline-block;
  width: 18px;
  height: 18px;
  background-color: #ccc;
  border: 1.5px solid #ccc;
  border-radius: 50%;
  vertical-align: middle;
  margin-right: 0.375rem;
  position: relative;
  top: -1px;
  transition: all 0.15s ease;
}

/* Hide the actual checkbox */
.hvf-checkbox-label input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

/* Selected pill state */
.hvf-checkbox-label:has(input:checked) {
  background: #3a3af4;
  border-color: #3a3af4;
  color: #fff;
}

.hvf-checkbox-label:has(input:checked) span::before {
  content: '✓';
  background: #fff;
  color: #3a3af4;
  border-color: #fff;
  font-size: 11px;
  font-weight: 700;
  text-align: center;
  line-height: 18px;
}

/* JS fallback for browsers without :has() */
.hvf-checkbox-label.hvf-checked {
  background: #3a3af4;
  border-color: #3a3af4;
  color: #fff;
}

.hvf-checkbox-label.hvf-checked span::before {
  content: '✓';
  background: #fff;
  color: #3a3af4;
  border-color: #fff;
  font-size: 11px;
  font-weight: 700;
  text-align: center;
  line-height: 18px;
}

/* ---------- Honeypot (hidden) ---------- */

.hvf-hp {
  position: absolute;
  left: -9999px;
  top: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
  visibility: hidden;
}

/* ---------- Submit button ---------- */

.hvf-submit {
  margin-top: 0.5rem;
}

.hvf-submit button {
  display: inline-block;
  padding: 0.625rem 2.5rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: #fff;
  background-color: #3a3af4;
  border: 2px solid #3a3af4;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.hvf-submit button:hover {
  background-color: #2e2ec0;
  border-color: #2e2ec0;
}

.hvf-submit button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ---------- Privacy notice ---------- */

.hvf-privacy {
  margin-top: 0.25rem;
}

.hvf-privacy p {
  font-size: 0.75rem;
  color: #888;
  line-height: 1.5;
}

.hvf-privacy a {
  color: #3a3af4;
  text-decoration: underline;
}

.hvf-privacy a:hover {
  color: #2e2ec0;
}

/* ---------- Success / Error messages ---------- */

.hvf-success {
  text-align: center;
  padding: 2rem;
  background: #f0faf0;
  border: 1px solid #4caf50;
  border-radius: 4px;
}

.hvf-success h3 {
  margin: 0 0 0.5rem;
  color: #2e7d32;
  font-size: 1.5rem;
}

.hvf-success p {
  margin: 0;
  color: #333;
  font-size: 1rem;
}

.hvf-submit-error {
  grid-column: 1 / -1;
  text-align: center;
  padding: 1rem;
  background: #fef0f0;
  border: 1px solid #d63638;
  border-radius: 4px;
}

.hvf-submit-error p {
  margin: 0;
  color: #d63638;
  font-size: 0.9375rem;
}

/* ---------- Mobile ---------- */

@media (max-width: 600px) {
  .hoopla-vendor-form {
    grid-template-columns: 1fr;
  }

  .hoopla-vendor-form-wrapper {
    padding: 1.5rem 1rem;
  }
}
