/**
 * StudioFlow DriveGallery v3.7.18 — Photographer Studio Presets Bar (`studio-presets.css`)
 * ---------------------------------------------------------------------------------------
 * Strictly scoped to `#builderShell:not([hidden])` so Mode B Client Galleries remain 100% untouched.
 * Engineered for 0px Horizontal Overflow on 360px–390px Mobile Viewports & Day/Night Harmony.
 */

#builderShell:not([hidden]) .sf-sp-wrap {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin: 0 0 14px 0;
  padding: 12px 14px;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.96) 0%, rgba(241, 245, 249, 0.88) 100%);
  border: 1px solid rgba(15, 23, 42, 0.09);
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.03);
  font-family: inherit;
}

html[data-workspace-night="1"] #builderShell:not([hidden]) .sf-sp-wrap,
html[data-theme="obsidian"] #builderShell:not([hidden]) .sf-sp-wrap {
  background: linear-gradient(180deg, rgba(22, 29, 43, 0.94) 0%, rgba(15, 21, 33, 0.92) 100%);
  border-color: rgba(148, 163, 184, 0.16);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.28);
}

#builderShell:not([hidden]) .sf-sp-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

#builderShell:not([hidden]) .sf-sp-title-group {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  flex-wrap: wrap;
}

#builderShell:not([hidden]) .sf-sp-title {
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.01em;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

html[data-workspace-night="1"] #builderShell:not([hidden]) .sf-sp-title,
html[data-theme="obsidian"] #builderShell:not([hidden]) .sf-sp-title {
  color: #f8fafc;
}

#builderShell:not([hidden]) .sf-sp-sync-pill {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.09);
  color: #1d4ed8;
  white-space: nowrap;
}

#builderShell:not([hidden]) .sf-sp-sync-pill.is-auto {
  background: rgba(16, 185, 129, 0.12);
  color: #047857;
}

html[data-workspace-night="1"] #builderShell:not([hidden]) .sf-sp-sync-pill,
html[data-theme="obsidian"] #builderShell:not([hidden]) .sf-sp-sync-pill {
  background: rgba(59, 130, 246, 0.18);
  color: #93c5fd;
}

html[data-workspace-night="1"] #builderShell:not([hidden]) .sf-sp-sync-pill.is-auto,
html[data-theme="obsidian"] #builderShell:not([hidden]) .sf-sp-sync-pill.is-auto {
  background: rgba(16, 185, 129, 0.2);
  color: #6ee7b7;
}

#builderShell:not([hidden]) .sf-sp-save-trigger {
  appearance: none;
  border: 1px solid rgba(37, 99, 235, 0.28);
  background: #ffffff;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 11px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.16s ease;
  white-space: nowrap;
  line-height: 1.3;
}

#builderShell:not([hidden]) .sf-sp-save-trigger:hover {
  background: #eff6ff;
  border-color: #2563eb;
}

html[data-workspace-night="1"] #builderShell:not([hidden]) .sf-sp-save-trigger,
html[data-theme="obsidian"] #builderShell:not([hidden]) .sf-sp-save-trigger {
  background: rgba(37, 99, 235, 0.18);
  border-color: rgba(96, 165, 250, 0.35);
  color: #bfdbfe;
}

html[data-workspace-night="1"] #builderShell:not([hidden]) .sf-sp-save-trigger:hover,
html[data-theme="obsidian"] #builderShell:not([hidden]) .sf-sp-save-trigger:hover {
  background: rgba(37, 99, 235, 0.28);
}

#builderShell:not([hidden]) .sf-sp-empty-hint {
  margin-top: 6px;
  font-size: 12px;
  color: #64748b;
  line-height: 1.45;
}

html[data-workspace-night="1"] #builderShell:not([hidden]) .sf-sp-empty-hint,
html[data-theme="obsidian"] #builderShell:not([hidden]) .sf-sp-empty-hint {
  color: #94a3b8;
}

#builderShell:not([hidden]) .sf-sp-chips-row {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 9px;
  overflow-x: auto;
  max-width: 100%;
  padding-bottom: 2px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

#builderShell:not([hidden]) .sf-sp-chips-row::-webkit-scrollbar {
  display: none;
}

#builderShell:not([hidden]) .sf-sp-chip {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: #ffffff;
  color: #1e293b;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  flex: 0 0 auto;
  transition: all 0.15s ease;
}

#builderShell:not([hidden]) .sf-sp-chip:hover {
  border-color: #2563eb;
  color: #1d4ed8;
}

#builderShell:not([hidden]) .sf-sp-chip.is-active {
  background: #1d4ed8;
  border-color: #1d4ed8;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(29, 78, 216, 0.26);
}

html[data-workspace-night="1"] #builderShell:not([hidden]) .sf-sp-chip,
html[data-theme="obsidian"] #builderShell:not([hidden]) .sf-sp-chip {
  background: rgba(30, 41, 59, 0.86);
  border-color: rgba(148, 163, 184, 0.22);
  color: #e2e8f0;
}

html[data-workspace-night="1"] #builderShell:not([hidden]) .sf-sp-chip.is-active,
html[data-theme="obsidian"] #builderShell:not([hidden]) .sf-sp-chip.is-active {
  background: #2563eb;
  border-color: #3b82f6;
  color: #ffffff;
}

#builderShell:not([hidden]) .sf-sp-chip-star {
  font-size: 11px;
  line-height: 1;
}

#builderShell:not([hidden]) .sf-sp-active-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed rgba(15, 23, 42, 0.1);
}

html[data-workspace-night="1"] #builderShell:not([hidden]) .sf-sp-active-actions,
html[data-theme="obsidian"] #builderShell:not([hidden]) .sf-sp-active-actions {
  border-top-color: rgba(148, 163, 184, 0.16);
}

#builderShell:not([hidden]) .sf-sp-mini-btn {
  appearance: none;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: rgba(255, 255, 255, 0.85);
  color: #334155;
  font-size: 11.5px;
  font-weight: 600;
  padding: 4px 9px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
}

#builderShell:not([hidden]) .sf-sp-mini-btn:hover {
  border-color: #2563eb;
  color: #1d4ed8;
}

#builderShell:not([hidden]) .sf-sp-mini-btn.is-default-on {
  background: rgba(245, 158, 11, 0.14);
  border-color: rgba(245, 158, 11, 0.4);
  color: #b45309;
}

#builderShell:not([hidden]) .sf-sp-mini-btn.is-danger {
  color: #dc2626;
  border-color: rgba(220, 38, 38, 0.22);
}

#builderShell:not([hidden]) .sf-sp-mini-btn.is-danger.is-confirming {
  background: #dc2626;
  border-color: #dc2626;
  color: #ffffff;
}

html[data-workspace-night="1"] #builderShell:not([hidden]) .sf-sp-mini-btn,
html[data-theme="obsidian"] #builderShell:not([hidden]) .sf-sp-mini-btn {
  background: rgba(15, 23, 42, 0.65);
  border-color: rgba(148, 163, 184, 0.22);
  color: #cbd5e1;
}

html[data-workspace-night="1"] #builderShell:not([hidden]) .sf-sp-mini-btn.is-default-on,
html[data-theme="obsidian"] #builderShell:not([hidden]) .sf-sp-mini-btn.is-default-on {
  background: rgba(245, 158, 11, 0.22);
  border-color: rgba(251, 191, 36, 0.45);
  color: #fde68a;
}

#builderShell:not([hidden]) .sf-sp-drawer {
  margin-top: 10px;
  padding: 11px 12px;
  border-radius: 11px;
  background: #ffffff;
  border: 1px solid rgba(37, 99, 235, 0.22);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

#builderShell:not([hidden]) .sf-sp-drawer[hidden] {
  display: none !important;
}

html[data-workspace-night="1"] #builderShell:not([hidden]) .sf-sp-drawer,
html[data-theme="obsidian"] #builderShell:not([hidden]) .sf-sp-drawer {
  background: rgba(15, 23, 42, 0.85);
  border-color: rgba(59, 130, 246, 0.35);
}

#builderShell:not([hidden]) .sf-sp-input-row {
  display: flex;
  gap: 7px;
  align-items: center;
  flex-wrap: wrap;
}

#builderShell:not([hidden]) .sf-sp-name-input {
  flex: 1 1 200px;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
  padding: 7px 11px;
  font-size: 13px;
  border-radius: 9px;
  border: 1px solid rgba(15, 23, 42, 0.16);
  background: #f8fafc;
  color: #0f172a;
}

html[data-workspace-night="1"] #builderShell:not([hidden]) .sf-sp-name-input,
html[data-theme="obsidian"] #builderShell:not([hidden]) .sf-sp-name-input {
  background: rgba(30, 41, 59, 0.9);
  border-color: rgba(148, 163, 184, 0.28);
  color: #f8fafc;
}

#builderShell:not([hidden]) .sf-sp-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  font-size: 12px;
  color: #334155;
}

html[data-workspace-night="1"] #builderShell:not([hidden]) .sf-sp-checks,
html[data-theme="obsidian"] #builderShell:not([hidden]) .sf-sp-checks {
  color: #cbd5e1;
}

#builderShell:not([hidden]) .sf-sp-check-lbl {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

#builderShell:not([hidden]) .sf-sp-drawer-btns {
  display: flex;
  gap: 7px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

#builderShell:not([hidden]) .sf-sp-btn-primary {
  appearance: none;
  border: none;
  background: #1d4ed8;
  color: #ffffff;
  font-size: 12.5px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 8px;
  cursor: pointer;
}

#builderShell:not([hidden]) .sf-sp-btn-cancel {
  appearance: none;
  border: 1px solid rgba(15, 23, 42, 0.14);
  background: transparent;
  color: #64748b;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 11px;
  border-radius: 8px;
  cursor: pointer;
}

@media (max-width: 540px) {
  #builderShell:not([hidden]) .sf-sp-wrap {
    padding: 10px 11px;
  }
  #builderShell:not([hidden]) .sf-sp-save-trigger {
    width: 100%;
    text-align: center;
  }
}
