/* Professional product logo editor workspace */
:root {
  --le-bg: #0c1117;
  --le-panel: #141a22;
  --le-panel-2: #1a222c;
  --le-border: rgba(255, 255, 255, 0.09);
  --le-text: #eef3f8;
  --le-muted: #8b9aab;
  --le-accent: #1ebdbd;
  --le-accent-2: #129a9a;
  --le-accent-soft: rgba(30, 189, 189, 0.16);
  --le-quote: #e8a54b;
  --le-quote-2: #c9842a;
  --le-danger: #e06b6b;
  --le-radius: 12px;
  --le-shadow: 0 20px 55px rgba(0, 0, 0, 0.42);
  --le-topbar-h: 64px;
}

.logo-editor-workspace-body .a11y-filter-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.logo-editor-workspace-body .back-to-top,
.logo-editor-workspace-body .cms-lightbox {
  display: none !important;
}

.site-main--logo-editor {
  flex: 1 1 auto;
  min-height: 0;
  margin: 0 !important;
  margin-bottom: 0 !important;
  padding: 0 !important;
  padding-bottom: 0 !important;
  background: var(--le-bg);
  display: flex;
  flex-direction: column;
}

.product-logo-editor--workspace {
  color: var(--le-text);
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  margin: 0;
  margin-bottom: 0;
  padding: 0;
  padding-bottom: 0;
}

.product-logo-editor--standalone {
  flex: 1 1 auto;
}

.le-shell {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  /* Fill remaining viewport under header; avoid extra spacer height that leaves a band above the footer. */
  min-height: 0;
  margin: 0;
  margin-bottom: 0;
  padding: 0;
  padding-bottom: 0;
  background:
    radial-gradient(1100px 520px at 8% -12%, rgba(30, 189, 189, 0.16), transparent 55%),
    radial-gradient(900px 480px at 100% 0%, rgba(80, 120, 200, 0.12), transparent 52%),
    var(--le-bg);
}

/* Sit footer flush under the editor — logo-editor page only (no effect on other pages). */
body.theme-body.logo-editor-workspace-body .site-footer,
body.theme-body.logo-editor-workspace-body footer.site-footer,
.logo-editor-workspace-body .site-footer,
.logo-editor-workspace-body footer.site-footer,
.logo-editor-workspace-body footer,
.logo-editor-workspace-body [data-tb-part="footer"],
.logo-editor-workspace-body .tb-part-footer,
.logo-editor-workspace-body .pb-theme-part--footer {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  border-top: 0 !important;
}

.logo-editor-workspace-body .pb-theme-part--footer {
  display: none !important;
}

/* Keep modal alerts compact and consistent with workspace alerts. */
#logoEditorEmailAlert.le-alert,
#logoEditorQuoteAlert.le-alert {
  margin: 0 0 0.75rem;
}

.le-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  padding: 0.65rem 0.95rem;
  border-bottom: 1px solid var(--le-border);
  background: rgba(12, 17, 23, 0.9);
  backdrop-filter: blur(14px);
  position: sticky;
  top: 0;
  z-index: 30;
  min-height: var(--le-topbar-h);
}

.le-topbar__brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-width: 0;
  flex: 0 1 auto;
}

.le-topbar__mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--le-accent), #5b7fff);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12), 0 8px 20px rgba(30, 189, 189, 0.3);
  flex: 0 0 auto;
}

.le-topbar__titles {
  min-width: 0;
}

.le-topbar__title {
  font-size: 0.95rem;
  font-weight: 650;
  margin: 0;
  line-height: 1.2;
}

.le-topbar__sub {
  margin: 0;
  font-size: 0.75rem;
  color: var(--le-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 28vw;
}

.le-topbar__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.3rem;
  flex: 1 1 auto;
}

.le-toolbar-group {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.28rem;
}

.le-topbar__sep {
  width: 1px;
  height: 24px;
  background: var(--le-border);
  margin: 0 0.2rem;
  flex: 0 0 auto;
}

.le-alert {
  margin: 0.75rem 1.1rem 0;
  border-radius: 10px;
  position: relative;
  opacity: 1;
  transition: opacity 0.35s ease, transform 0.35s ease;
  transform: translateY(0);
}

.le-alert.is-hiding {
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
}

.le-alert__body {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.le-alert__msg {
  flex: 1 1 auto;
  min-width: 0;
}

.le-alert__close {
  flex: 0 0 auto;
  appearance: none;
  border: 0;
  background: transparent;
  color: inherit;
  opacity: 0.75;
  padding: 0.1rem 0.25rem;
  line-height: 1;
  cursor: pointer;
  border-radius: 6px;
}

.le-alert__close:hover,
.le-alert__close:focus-visible {
  opacity: 1;
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

.le-workspace {
  display: grid;
  grid-template-columns: minmax(260px, 320px) 1fr;
  gap: 0;
  flex: 1;
  min-height: 0;
}

.le-sidebar {
  border-right: 1px solid var(--le-border);
  background: rgba(20, 26, 34, 0.94);
  padding: 0.85rem;
  overflow: auto;
  max-height: calc(100vh - var(--le-topbar-h));
}

.le-panel {
  background: var(--le-panel-2);
  border: 1px solid var(--le-border);
  border-radius: var(--le-radius);
  padding: 0.85rem;
  margin-bottom: 0.75rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.le-panel__label {
  font-size: 0.7rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  font-weight: 700;
  color: #8fd9d6;
  margin-bottom: 0.55rem;
}

.le-panel__hint,
.le-mini-label {
  font-size: 0.78rem;
  color: var(--le-muted);
  margin-bottom: 0.45rem;
}

.le-mini-label {
  font-weight: 600;
  color: #c5d0db;
}

.le-btn-stack {
  display: grid;
  gap: 0.4rem;
}

.le-btn,
.le-tool {
  appearance: none;
  border: 1px solid var(--le-border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--le-text);
  border-radius: 10px;
  padding: 0.55rem 0.75rem;
  font-size: 0.84rem;
  line-height: 1.2;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.12s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.le-btn:hover,
.le-tool:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.18);
  color: #fff;
  text-decoration: none;
  transform: translateY(-1px);
}

.le-btn:active,
.le-tool:active {
  transform: translateY(0);
}

.le-btn:focus-visible,
.le-tool:focus-visible,
.le-seg:focus-visible,
.product-logo-editor__swatch:focus-visible {
  outline: 2px solid var(--le-accent);
  outline-offset: 2px;
}

.le-btn:disabled,
.le-tool:disabled,
.le-seg:disabled,
.le-btn.is-disabled,
a.le-btn[aria-disabled="true"] {
  opacity: 0.38;
  cursor: not-allowed;
  pointer-events: none;
  transform: none;
}

.le-btn--iconlabel {
  padding: 0.42rem 0.62rem;
  font-size: 0.78rem;
  white-space: nowrap;
}

.le-btn--iconlabel i {
  font-size: 0.95rem;
}

.le-btn--primary {
  background: linear-gradient(180deg, #2ad4d4, #1a9e9e);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #041414;
  font-weight: 700;
  box-shadow: 0 6px 16px rgba(30, 189, 189, 0.32);
}

.le-btn--primary:hover,
.le-btn--primary:focus-visible {
  background: linear-gradient(180deg, #5ee0e0, #22b8b8);
  border-color: rgba(255, 255, 255, 0.35);
  color: #041414;
  filter: none;
  box-shadow: 0 8px 20px rgba(30, 189, 189, 0.4);
}

.le-btn--primary:active {
  background: linear-gradient(180deg, #1ebdbd, #128a8a);
  border-color: rgba(255, 255, 255, 0.28);
  color: #041414;
  filter: none;
  transform: translateY(0);
  box-shadow: 0 3px 10px rgba(30, 189, 189, 0.28);
}

.le-btn--primary:disabled,
.le-btn--primary.is-disabled {
  background: rgba(30, 189, 189, 0.28);
  border-color: rgba(30, 189, 189, 0.22);
  color: rgba(230, 245, 245, 0.72);
  box-shadow: none;
  opacity: 1;
  filter: none;
}

.le-btn--accent {
  background: linear-gradient(180deg, var(--le-quote), var(--le-quote-2));
  border-color: transparent;
  color: #1a1205;
  font-weight: 700;
  box-shadow: 0 6px 16px rgba(232, 165, 75, 0.28);
}

.le-btn--accent:hover,
.le-btn--accent:focus-visible {
  background: linear-gradient(180deg, #f0b86a, #d4923a);
  border-color: transparent;
  color: #1a1205;
  filter: none;
}

.le-btn--accent:active {
  background: linear-gradient(180deg, #e8a54b, #b87722);
  color: #1a1205;
  filter: none;
  transform: translateY(0);
}

.le-btn--danger {
  border-color: rgba(224, 107, 107, 0.45);
  color: #ffb4b4;
}

.le-btn--ghost {
  background: transparent;
  padding: 0.4rem 0.55rem;
}

.le-btn--ghost:hover {
  background: rgba(255, 255, 255, 0.06);
}

.le-toolgrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem;
}

.le-tool {
  flex-direction: column;
  min-height: 58px;
  font-size: 0.7rem;
  text-align: center;
}

.le-tool i {
  font-size: 1rem;
}

.le-tool.active {
  background: var(--le-accent-soft);
  border-color: rgba(30, 189, 189, 0.5);
  color: #dffafa;
}

.le-slider-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.5rem;
  align-items: center;
  margin-top: 0.65rem;
  font-size: 0.78rem;
  color: var(--le-muted);
}

.le-segmented {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem;
}

.le-segmented--stack {
  grid-template-columns: 1fr;
}

.le-seg {
  border: 1px solid var(--le-border);
  background: transparent;
  color: var(--le-muted);
  border-radius: 999px;
  padding: 0.45rem 0.6rem;
  font-size: 0.78rem;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.le-seg:hover:not(:disabled) {
  color: var(--le-text);
  border-color: rgba(255, 255, 255, 0.18);
}

.le-seg.is-active {
  background: var(--le-accent-soft);
  border-color: rgba(30, 189, 189, 0.55);
  color: #dffafa;
  font-weight: 650;
}

.le-canvas-wrap {
  display: flex;
  align-items: stretch;
  justify-content: center;
  padding: 1.1rem;
  min-width: 0;
}

.le-canvas-frame {
  width: 100%;
  max-width: 1100px;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.product-logo-editor__stage {
  position: relative;
  overflow: auto;
  width: 100%;
  min-height: 420px;
  max-height: calc(100vh - 150px);
  touch-action: none;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: var(--le-shadow);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 28%),
    radial-gradient(circle at 50% 28%, rgba(255, 255, 255, 0.05), transparent 55%),
    repeating-conic-gradient(from 45deg, #1c2430 0% 25%, #141a22 0% 50%) 0 0 / 18px 18px;
}

.product-logo-editor__stage canvas {
  display: block;
  max-width: 100%;
  margin: 0 auto;
  background: transparent;
}

.le-canvas-caption {
  text-align: center;
  color: var(--le-muted);
  font-size: 0.82rem;
  margin: 0;
}

.product-logo-editor__photos-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.product-logo-editor__photo {
  width: 58px;
  height: 58px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 10px;
  overflow: hidden;
  background: #0d1218;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.product-logo-editor__photo:hover {
  border-color: rgba(255, 255, 255, 0.25);
}

.product-logo-editor__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.product-logo-editor__photo.is-active {
  border-color: var(--le-accent);
  box-shadow: 0 0 0 1px rgba(30, 189, 189, 0.35);
}

.product-logo-editor__swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}

.product-logo-editor__swatch {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.22);
  background: var(--swatch, #ccc);
  padding: 0;
  cursor: pointer;
  transition: transform 0.12s ease, outline-color 0.12s ease;
}

.product-logo-editor__swatch:hover:not(:disabled) {
  transform: scale(1.08);
}

.product-logo-editor__swatch.is-selected {
  outline: 2px solid var(--le-accent);
  outline-offset: 2px;
}

.product-logo-editor__swatch--picker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: conic-gradient(from 0deg, red, yellow, lime, aqua, blue, magenta, red);
}

.product-logo-editor__swatch--picker input {
  width: 140%;
  height: 140%;
  border: 0;
  padding: 0;
  cursor: pointer;
  opacity: 0.01;
}

.product-logo-editor__preview-img {
  max-height: 52px;
  max-width: 140px;
  object-fit: contain;
  background:
    linear-gradient(45deg, #2a3340 25%, transparent 25%),
    linear-gradient(-45deg, #2a3340 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #2a3340 75%),
    linear-gradient(-45deg, transparent 75%, #2a3340 75%);
  background-size: 10px 10px;
  background-position: 0 0, 0 5px, 5px -5px, -5px 0;
  border: 1px solid var(--le-border);
  border-radius: 8px;
  display: block;
  margin-top: 0.35rem;
}

.le-logo-colors {
  margin-top: 0.35rem;
  padding-top: 0.65rem;
  border-top: 1px solid var(--le-border);
}

.form-range {
  accent-color: var(--le-accent);
}

.form-select-sm {
  background-color: #121820;
  color: var(--le-text);
  border-color: var(--le-border);
}

@media (max-width: 1199.98px) {
  .le-btn--iconlabel span {
    display: none;
  }

  .le-btn--iconlabel {
    min-width: 36px;
    justify-content: center;
  }

  .le-topbar__sub {
    max-width: 22vw;
  }
}

@media (max-width: 991.98px) {
  .le-workspace {
    grid-template-columns: 1fr;
  }

  .le-sidebar {
    max-height: none;
    border-right: 0;
    border-bottom: 1px solid var(--le-border);
  }

  .product-logo-editor__stage {
    min-height: 320px;
    max-height: 70vh;
  }

  .le-topbar {
    flex-direction: column;
    align-items: stretch;
  }

  .le-topbar__actions {
    justify-content: flex-start;
  }

  .le-topbar__sub {
    max-width: 70vw;
  }

  .le-topbar__sep {
    display: none;
  }
}

@media (max-width: 575.98px) {
  .le-toolgrid {
    grid-template-columns: 1fr 1fr;
  }

  .le-toolbar-group--actions .le-btn--primary span,
  .le-toolbar-group--actions .le-btn--accent span {
    display: inline;
  }
}

/* Floating text properties panel */
.product-logo-editor__stage {
  position: relative;
}

.le-text-props {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: min(320px, calc(100% - 1.5rem));
  max-height: min(72vh, 560px);
  overflow: auto;
  z-index: 20;
  background: rgba(20, 26, 34, 0.96);
  border: 1px solid var(--le-border);
  border-radius: var(--le-radius);
  box-shadow: var(--le-shadow);
  padding: 0.75rem;
  color: var(--le-text);
}

.le-text-props__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
}

.le-text-props__label {
  display: block;
  font-size: 0.72rem;
  color: var(--le-muted);
  margin-bottom: 0.2rem;
}

.le-text-props__body > * + * {
  margin-top: 0.55rem;
}

.le-text-props__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.le-text-props__toggles,
.le-text-props__align,
.le-text-props__bg {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}

.le-text-props .le-btn.is-active,
.le-text-props .le-tool.is-active {
  background: var(--le-accent-soft);
  border-color: var(--le-accent);
  color: #fff;
}

.le-toolgrid--compact {
  grid-template-columns: 1fr 1fr;
  margin-top: 0.35rem;
}

.le-tool--danger {
  color: var(--le-danger);
}

.le-btn--sm {
  padding: 0.25rem 0.45rem;
  font-size: 0.8rem;
}

.le-btn--icon {
  width: 2rem;
  height: 2rem;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 767.98px) {
  .le-text-props {
    position: fixed;
    left: 0.5rem;
    right: 0.5rem;
    bottom: 0.5rem;
    top: auto;
    width: auto;
    max-height: 48vh;
  }
}

/* PDF options modal (logged-in Save flow) */
.le-pdf-options .modal-body {
  padding-top: 0.75rem;
}

.le-pdf-options__intro {
  font-size: 0.92rem;
}

.le-pdf-options__section {
  padding: 1rem 0;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.le-pdf-options__section:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.le-pdf-options__heading {
  font-size: 1rem;
  font-weight: 650;
  margin: 0 0 0.75rem;
}

.le-pdf-options__logo-row {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.le-pdf-options__logo-preview {
  width: 72px;
  height: 72px;
  object-fit: contain;
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  background: #fff;
  flex: 0 0 auto;
}

.le-pdf-options__group + .le-pdf-options__group {
  margin-top: 0.85rem;
}

.le-pdf-options__group-title {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #6b7785;
  margin: 0 0 0.45rem;
}

.le-pdf-options__checks {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.35rem 1rem;
}

.le-pdf-options.is-generating .btn-close,
.le-pdf-options.is-generating #logoEditorPdfOptionsCancel,
.le-pdf-options.is-generating #logoEditorPdfOptionsGenerate {
  pointer-events: none;
  opacity: 0.55;
}

.le-pdf-options.is-generating .modal-body > *:not(.le-pdf-options__busy) {
  pointer-events: none;
  opacity: 0.55;
}

.le-pdf-options.is-generating .le-pdf-options__busy {
  pointer-events: auto;
  opacity: 1;
}

.le-pdf-options__busy {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-top: 0.75rem;
  color: #5c6b7a;
  font-size: 0.9rem;
}

.le-pdf-options__mode {
  border: 0;
  margin: 0;
  padding: 0;
  min-inline-size: 0;
}

.le-pdf-options__mode-legend {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #6b7785;
  margin-bottom: 0.45rem;
}

.le-pdf-options__mode-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
}

.le-pdf-price-table {
  margin-bottom: 0.5rem;
}

.le-pdf-price-table th,
.le-pdf-price-table td {
  vertical-align: middle;
}

.le-pdf-price-table__actions {
  width: 2.75rem;
  text-align: center;
  white-space: nowrap;
}

.le-pdf-price-table__currency {
  font-weight: 600;
  margin-left: 0.15rem;
}

.le-pdf-price-table__sym {
  min-width: 2rem;
  justify-content: center;
}

@media (max-width: 575.98px) {
  .le-pdf-options__checks {
    grid-template-columns: 1fr;
  }

  .le-pdf-options__logo-row {
    align-items: flex-start;
  }
}
