/* ── Aroz Form Field: single image upload ── */
.aroz-form-image-field { display: flex; flex-direction: column; gap: 10px; }
.aroz-form-image-preview img {
  max-width: 100%;
  max-height: 220px;
  border-radius: 8px;
  object-fit: contain;
  display: block;
}

/* ── Aroz Form Field: multi-image dropzone ── */
.aroz-form-gallery-field { display: flex; flex-direction: column; gap: 4px; }
.aroz-form-gallery-dropzone {
  border: 2px dashed rgba(0, 0, 0, 0.2);
  border-radius: 10px;
  padding: 24px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}
.aroz-form-gallery-dropzone.is-dragover {
  border-color: currentColor;
  background-color: rgba(0, 0, 0, 0.03);
}
.aroz-form-gallery-dropzone input[type="file"] { display: none; }
.aroz-form-gallery-icon { display: flex; justify-content: center; margin-bottom: 8px; }
.aroz-form-gallery-icon img,
.aroz-form-gallery-icon svg,
.aroz-form-gallery-icon i { width: 32px; height: 32px; font-size: 32px; }
.aroz-form-gallery-text { margin: 0 0 4px; }
.aroz-form-gallery-hint {
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.02em;
  opacity: 0.65;
}
.aroz-form-gallery-error {
  display: none;
  margin-top: 8px;
  font-size: 12px;
  color: #d63638;
}
.aroz-form-gallery-error.is-visible { display: block; }
.aroz-form-gallery-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding:10px;
}
.aroz-form-gallery-item { position: relative; }
.aroz-form-gallery-item img {
  display: block;
  width: 84px;
  height: 84px;
  object-fit: cover;
  border-radius: 8px;
}
.aroz-form-gallery-remove {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 20px;
  height: 20px;
  line-height: 18px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: #d63638;
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.aroz-form-gallery-remove:hover { background: #b32d2e; }

/* ── Aroz Form Field: custom (styleable) dropdown ──
   Only structural/behavioral rules live here (positioning, open/closed
   visibility) — colors, borders, spacing etc. are intentionally left
   unstyled so they can be customized per-element in Bricks. Target
   .aroz-dropdown-trigger, .aroz-dropdown-list, .aroz-dropdown-option and
   .aroz-dropdown-option.is-selected to skin it. */
.aroz-dropdown { position: relative; }
.aroz-dropdown-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  cursor: pointer;
  background: none;
  font: inherit;
  color: inherit;
}
.aroz-dropdown-arrow {
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 5px solid currentColor;
  transition: transform 0.2s ease;
  flex-shrink: 0;
}
.aroz-dropdown.is-open .aroz-dropdown-arrow { transform: rotate(180deg); }
.aroz-dropdown-list {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 20;
  display: none;
  max-height: 260px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}
.aroz-dropdown.is-open .aroz-dropdown-list { display: block; }
.aroz-dropdown-option { padding: 8px 12px; cursor: pointer; }
.aroz-dropdown-option:hover { background: rgba(0, 0, 0, 0.04); }
.aroz-dropdown-option.is-selected { font-weight: 600; }

/* ── Aroz Form Field: Range / Slider ──
   Native mode keeps the browser's <input type="range"> (thumb styling is
   browser/pseudo-element territory, so only spacing lives here). Custom mode
   is plain track/fill/thumb divs — fully restylable via
   .aroz-range-track / .aroz-range-fill / .aroz-range-thumb (shape, size,
   color — make .aroz-range-thumb border-radius:50% for a round handle). */
.aroz-range { display: flex; flex-direction: column; gap: 8px; }
.aroz-range-value {
  align-self: flex-start;
  font-weight: 600;
  font-size: 13px;
}
.aroz-range-track-wrap { position: relative; }
.aroz-range-track-wrap > input[type="range"] { display: block; width: 100%; }
.aroz-range-row { display: flex; align-items: center; gap: 8px; }
.aroz-range-row .aroz-range-track-wrap { flex: 1; }
.aroz-range--value-right .aroz-range-value,
.aroz-range--value-left .aroz-range-value { align-self: center; }
.aroz-range-value--floating {
  position: absolute;
  bottom: 100%;
  margin-bottom: 10px;
  transform: translateX(-50%);
  white-space: nowrap;
  align-self: auto;
}
.aroz-range-minmax {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  opacity: 0.7;
}
.aroz-range-minmax .aroz-range-median { margin: 0 auto; }
.aroz-range-track {
  position: relative;
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.12);
  cursor: pointer;
}
.aroz-range-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  border-radius: inherit;
  background: currentColor;
  pointer-events: none;
}
.aroz-range-thumb {
  position: absolute;
  top: 50%;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: currentColor;
  transform: translate(-50%, -50%);
  cursor: grab;
  touch-action: none;
}
.aroz-range-thumb:active { cursor: grabbing; }

/* ── Aroz Form Field: Icon + Label boxes (single select) ──
   Same "click a tile to select" pattern as [aroz_brands selectable="yes"].
   Grid density comes from --aroz-boxselect-cols; the Columns control's 'css'
   mapping (see Aroz_Field_Element::set_controls()) makes Bricks itself emit
   the responsive overrides for this variable at each of the site's
   breakpoints, the same way it does for padding/margin. Colors/borders/hover
   are left to CSS on .aroz-boxselect-option and .aroz-boxselect-option.is-selected. */
.aroz-boxselect-grid {
  display: grid;
  grid-template-columns: repeat(var(--aroz-boxselect-cols, 3), 1fr);
  gap: 12px;
}
.aroz-boxselect-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 10px;
  text-align: center;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 10px;
  cursor: pointer;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.aroz-boxselect-option:hover { transform: translateY(-2px); }
.aroz-boxselect-option.is-selected { border-color: currentColor; border-width: 2px; }
.aroz-boxselect-icon { display: flex; align-items: center; justify-content: center; }
.aroz-boxselect-icon img,
.aroz-boxselect-icon svg { width: 32px; height: 32px; object-fit: contain; }
.aroz-boxselect-label { font-size: 13px; font-weight: 600; }

/* ── Submission feedback toast ── */
.aroz-form-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 999999;
  max-width: 360px;
  padding: 12px 18px;
  border-radius: 8px;
  font-size: 14px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}
.aroz-form-toast.is-visible { opacity: 1; transform: translateY(0); }
.aroz-form-toast--success { background: #f0fff4; color: #276749; border: 1px solid rgba(56, 161, 105, 0.3); }
.aroz-form-toast--error   { background: #fff5f5; color: #9b2c2c; border: 1px solid rgba(229, 62, 62, 0.3); }

/* ── Submit trigger busy state ── */
.aroz-form-submitting { opacity: 0.6; pointer-events: none; }

/* ── Submit trigger busy state ── */
.aroz-form-submitting { opacity: 0.6; pointer-events: none; }
