/* ============================================================
   SWS Demo Customizer — the floating panel for live demo customization.
   Loaded by every demo page. Independent visual layer on top of the demo.
   ============================================================ */

.sws-cust-fab {
  position: fixed;
  bottom: max(1rem, env(safe-area-inset-bottom));
  right: 1rem;
  z-index: 9000;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1.125rem;
  background: #ffffff;
  color: #0a0a0c;
  border: 0;
  border-radius: 100px;
  font-family: 'Inter', ui-sans-serif, system-ui, sans-serif;
  font-size: 0.8125rem;
  font-weight: 700;
  box-shadow: 0 12px 32px -8px rgba(0,0,0,0.4), 0 0 0 1px rgba(0,0,0,0.05);
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease;
}
.sws-cust-fab:hover { transform: translateY(-2px); }
.sws-cust-fab[hidden] { display: none; }
.sws-cust-fab-icon {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--brand-color, #d2401e);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.sws-cust-fab-icon svg { width: 13px; height: 13px; stroke: #fff; stroke-width: 2.2; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.sws-cust-fab-lbl-mob { display: inline; }
.sws-cust-fab-lbl-desk { display: none; }
@media (min-width: 768px) {
  .sws-cust-fab-lbl-mob { display: none; }
  .sws-cust-fab-lbl-desk { display: inline; }
}

/* Backdrop */
.sws-cust-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9100;
  background: rgba(0, 0, 0, 0.55);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.sws-cust-backdrop[data-open="true"] {
  opacity: 1;
  pointer-events: auto;
}

/* Panel */
.sws-cust-panel {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9200;
  max-height: 88vh;
  background: #ffffff;
  color: #0a0a0c;
  border-radius: 22px 22px 0 0;
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  font-family: 'Inter', ui-sans-serif, system-ui, sans-serif;
  padding-bottom: env(safe-area-inset-bottom);
  box-shadow: 0 -16px 64px -16px rgba(0,0,0,0.4);
}
.sws-cust-panel[data-open="true"] { transform: translateY(0); }
@media (min-width: 768px) {
  .sws-cust-panel {
    bottom: max(1rem, env(safe-area-inset-bottom));
    left: auto;
    right: 1rem;
    border-radius: 18px;
    max-width: 380px;
    max-height: calc(100vh - 2rem);
    transform: translateY(110%) translateX(0);
  }
  .sws-cust-panel[data-open="true"] { transform: translateY(0); }
}

.sws-cust-grip {
  width: 36px; height: 4px;
  background: rgba(0,0,0,0.15);
  border-radius: 100px;
  margin: 0.625rem auto 0;
  flex-shrink: 0;
}
@media (min-width: 768px) { .sws-cust-grip { display: none; } }

.sws-cust-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.5rem 0.5rem;
}
.sws-cust-head-title {
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.sws-cust-head-eyebrow {
  display: block;
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brand-color, #d2401e);
  margin-bottom: 0.25rem;
}
.sws-cust-close {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: rgba(0,0,0,0.05);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #56504a;
  font-size: 1.125rem;
  cursor: pointer;
  border: 0;
  flex-shrink: 0;
}
.sws-cust-close:hover { background: rgba(0,0,0,0.10); }

.sws-cust-tabbar {
  display: flex;
  gap: 0.25rem;
  padding: 0.25rem;
  margin: 0.5rem 1.5rem 0;
  background: rgba(0,0,0,0.05);
  border-radius: 10px;
}
.sws-cust-tab {
  flex: 1;
  padding: 0.5rem 0.75rem;
  background: transparent;
  color: #56504a;
  border: 0;
  border-radius: 7px;
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.sws-cust-tab:hover { color: #1a1714; }
.sws-cust-tab[data-active="true"] {
  background: #ffffff;
  color: #1a1714;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.sws-cust-tab-panel {
  display: block;
}
.sws-cust-tab-panel[hidden] { display: none; }

.sws-cust-body {
  flex: 1;
  overflow-y: auto;
  padding: 0.75rem 1.5rem 1.5rem;
}

.sws-cust-note {
  font-size: 0.8125rem;
  color: #56504a;
  line-height: 1.55;
  margin-bottom: 1.25rem;
  padding: 0.75rem 0.875rem;
  background: rgba(0,0,0,0.03);
  border-radius: 8px;
}
.sws-cust-note strong { color: #1a1714; font-weight: 700; }

.sws-cust-field { margin-bottom: 1.125rem; }
.sws-cust-field label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #1a1714;
  margin-bottom: 0.4rem;
}
.sws-cust-input {
  width: 100%;
  padding: 0.625rem 0.75rem;
  font-size: 0.9375rem;
  font-family: inherit;
  color: #1a1714;
  background: #f4ede4;
  border: 1px solid rgba(0,0,0,0.10);
  border-radius: 8px;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.sws-cust-input:focus {
  outline: none;
  border-color: var(--brand-color, #d2401e);
  background: #fff;
}

.sws-cust-color-row {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  flex-wrap: wrap;
}
.sws-cust-color-input {
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgba(0,0,0,0.10);
  border-radius: 8px;
  cursor: pointer;
  background: transparent;
  flex-shrink: 0;
}
.sws-cust-color-input::-webkit-color-swatch-wrapper { padding: 4px; border-radius: 6px; }
.sws-cust-color-input::-webkit-color-swatch { border-radius: 4px; border: 0; }
.sws-cust-color-presets {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}
.sws-cust-color-preset {
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.15s ease;
  padding: 0;
}
.sws-cust-color-preset:hover { transform: scale(1.1); }
.sws-cust-color-preset[data-active="true"] { border-color: #1a1714; }

.sws-cust-logo-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.sws-cust-logo-preview {
  width: 48px; height: 48px;
  border-radius: 8px;
  background: var(--brand-color, #d2401e);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 900;
  font-size: 1rem;
  letter-spacing: -0.05em;
  overflow: hidden;
  flex-shrink: 0;
}
.sws-cust-logo-preview img { width: 100%; height: 100%; object-fit: cover; }
.sws-cust-logo-upload {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.875rem;
  background: rgba(0,0,0,0.05);
  color: #1a1714;
  border-radius: 8px;
  font-size: 0.8125rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease;
  border: 0;
  font-family: inherit;
}
.sws-cust-logo-upload:hover { background: rgba(0,0,0,0.10); }
.sws-cust-logo-clear {
  font-size: 0.75rem;
  color: #56504a;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 0.5rem 0.25rem;
  font-family: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.sws-cust-logo-clear:hover { color: #1a1714; }
.sws-cust-logo-clear[hidden] { display: none; }

.sws-cust-select {
  width: 100%;
  padding: 0.625rem 0.75rem;
  font-size: 0.9375rem;
  font-family: inherit;
  font-weight: 600;
  color: #1a1714;
  background: #f4ede4;
  border: 1px solid rgba(0,0,0,0.10);
  border-radius: 8px;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path fill='%231a1714' d='M6 8L0 0h12z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2rem;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.sws-cust-select:focus {
  outline: none;
  border-color: var(--brand-color, #d2401e);
  background-color: #fff;
}
.sws-cust-hint {
  font-size: 0.6875rem;
  color: #56504a;
  line-height: 1.5;
  margin-top: 0.4rem;
}

.sws-cust-theme-row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.sws-cust-theme-opt {
  flex: 1 1 auto;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 0.75rem;
  background: rgba(0,0,0,0.04);
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 8px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #1a1714;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.sws-cust-theme-opt:hover { background: rgba(0,0,0,0.07); }
.sws-cust-theme-opt input { accent-color: var(--brand-color, #d2401e); margin: 0; }
.sws-cust-theme-opt:has(input:checked) {
  background: var(--brand-color-soft, rgba(210, 64, 30, 0.12));
  border-color: var(--brand-color, #d2401e);
  color: #1a1714;
}

.sws-cust-mobile-toggle-btn {
  width: 100%;
  padding: 0.625rem 0.875rem;
  background: rgba(0,0,0,0.04);
  border: 1px solid rgba(0,0,0,0.10);
  border-radius: 8px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #1a1714;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.sws-cust-mobile-toggle-btn:hover {
  background: rgba(0,0,0,0.08);
  border-color: rgba(0,0,0,0.18);
}
.sws-cust-mobile-toggle-btn span[data-on="true"] {
  color: var(--brand-color, #d2401e);
}

.sws-cust-real-cta {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1.25rem;
  padding: 1rem 1.125rem;
  background: var(--brand-color, #d2401e);
  color: #fff;
  border-radius: 12px;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 10px 24px -10px rgba(0,0,0,0.35);
}
.sws-cust-real-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px -10px rgba(0,0,0,0.45);
}
.sws-cust-real-cta-body {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}
.sws-cust-real-cta-body strong {
  font-size: 0.875rem;
  font-weight: 800;
  letter-spacing: -0.005em;
}
.sws-cust-real-cta-body span {
  font-size: 0.75rem;
  font-weight: 500;
  opacity: 0.92;
  line-height: 1.45;
}
.sws-cust-real-cta-arrow {
  font-size: 1.25rem;
  font-weight: 700;
  flex-shrink: 0;
}

.sws-cust-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(0,0,0,0.08);
}
.sws-cust-action {
  flex: 1;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  font-size: 0.875rem;
  font-weight: 700;
  cursor: pointer;
  border: 0;
  transition: background 0.15s ease;
  font-family: inherit;
}
.sws-cust-action-primary {
  background: #1a1714;
  color: #fff;
}
.sws-cust-action-primary:hover { background: #000; }
.sws-cust-action-reset {
  background: rgba(0,0,0,0.05);
  color: #1a1714;
}
.sws-cust-action-reset:hover { background: rgba(0,0,0,0.10); }
