/* ========================================
   WODFEST SALOU 2026 — Form primitives
   Shared by the checkout page and the WODFEST Experience booking panel.
   Depends on the tokens defined in style.css
======================================== */

:root {
  --field-height: 56px;
  --field-radius: var(--radius-control);
  --field-surface: rgba(255, 255, 255, 0.04);
  --field-surface-hover: rgba(255, 255, 255, 0.052);
  --field-surface-focus: rgba(255, 255, 255, 0.05);
  --field-border: rgba(255, 255, 255, 0.1);
  --field-border-hover: rgba(255, 255, 255, 0.16);
  --field-focus-ring: 0 0 0 3px rgba(33, 150, 243, 0.12);
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  color: var(--gray-light);
  font-weight: 600;
  margin-bottom: 8px;
  font-size: 0.84375rem;
  letter-spacing: 0.01em;
}

.form-group label .required {
  color: #ef6461;
  margin-left: 2px;
}

.form-input,
.form-select {
  width: 100%;
  min-height: var(--field-height);
  padding: 15px 18px;
  background: var(--field-surface);
  border: 1px solid var(--field-border);
  border-radius: var(--field-radius);
  color: var(--white);
  font-size: 1rem;
  line-height: 1.2;
  transition: all 0.2s ease;
  font-family: var(--font-body);
}

.form-input:hover,
.form-select:hover {
  border-color: var(--field-border-hover);
  background: var(--field-surface-hover);
}

.form-input:focus,
.form-select:focus {
  outline: none;
}

.form-input:focus-visible,
.form-select:focus-visible {
  border-color: var(--blue-light);
  box-shadow: var(--field-focus-ring);
  background: var(--field-surface-focus);
}

.form-input:focus:not(:focus-visible),
.form-select:focus:not(:focus-visible) {
  border-color: var(--field-border);
  box-shadow: none;
  background: var(--field-surface);
}

.form-input::placeholder {
  color: var(--gray);
  opacity: 0.5;
}

.form-hint {
  display: block;
  color: var(--gray);
  font-size: 0.6875rem;
  margin-top: 6px;
}

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23bbb' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 18px center;
  padding-right: 48px;
  cursor: pointer;
}

/* --- Consent row -------------------------------------------------------
   One checkbox row shared by the checkout page and the seminar booking
   panel. Page stylesheets must not restyle it: the two copies had already
   drifted apart once.
----------------------------------------------------------------------- */
.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  padding: 12px 14px;
  margin-bottom: 0;
  color: var(--gray-light);
  font-size: 0.8125rem;
  line-height: 1.5;
  border-radius: 10px;
  transition: background 0.2s ease;
}

.checkbox-label:hover {
  background: rgba(255, 255, 255, 0.03);
}

.checkbox-label + .checkbox-label {
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.checkbox-label input[type="checkbox"] {
  -webkit-appearance: none;
  appearance: none;
  position: relative;
  width: 20px;
  height: 20px;
  min-width: 20px;
  margin: 0;
  margin-top: 1px;
  cursor: pointer;
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.checkbox-label input[type="checkbox"]::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 6px;
  width: 5px;
  height: 9px;
  border: solid transparent;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) scale(0);
  transition: transform 0.15s cubic-bezier(0.2, 0, 0.13, 2), border-color 0.15s ease;
}

.checkbox-label input[type="checkbox"]:checked {
  background: var(--blue-light);
  border-color: var(--blue-light);
  box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.15);
}

.checkbox-label input[type="checkbox"]:checked::after {
  border-color: var(--white);
  transform: rotate(45deg) scale(1);
}

.checkbox-label:hover input[type="checkbox"]:not(:checked) {
  border-color: rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.06);
}

.checkbox-label input[type="checkbox"]:focus-visible {
  outline: var(--focus-visible-ring);
  outline-offset: 3px;
}

.checkbox-label input[type="checkbox"]:focus:not(:focus-visible) {
  outline: none;
}

.checkbox-label span {
  flex: 1;
}

.checkbox-label a {
  color: var(--blue-light);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-color: rgba(33, 150, 243, 0.4);
  transition: color 0.15s ease, text-decoration-color 0.15s ease;
}

.checkbox-label a:hover {
  color: var(--white);
  text-decoration-color: var(--white);
}

.checkbox-label a:focus-visible {
  outline: var(--focus-visible-ring);
  outline-offset: 3px;
  border-radius: 2px;
}

.checkbox-label a:focus:not(:focus-visible) {
  outline: none;
}

.checkbox-label.error {
  color: #ef6461;
}

.checkbox-label.error input[type="checkbox"] {
  border-color: #ef6461;
}

.checkbox-label.error .error-message {
  display: block;
  margin-top: 4px;
}
