/* Layer picker for Selected work and Creative direction. Drag a project layer onto the canvas to open its file. */

/* Workspace gets the panel column back on this page. */
@media (min-width: 901px) {
  .work-layers-page .workspace {
    grid-template-columns: 48px minmax(0, 1fr) 282px !important;
  }
}

/* Only the open file is on the canvas once the script is running. */
.js-layers .is-file-hidden {
  display: none !important;
}

/* Picker state uses the visitor's colour, like Home. Each project keeps its own palette. */
.work-layers-page[data-open="none"] {
  --paper: #e8e0d6;
  --type: #201d1b;
  --muted: #736b64;
  background: #e8e0d6;
}
.work-layers-page[data-open="none"] .stage {
  background: #e8e0d6;
}
.work-layers-page[data-open="none"] .canvas-glow {
  background:
    radial-gradient(42% 38% at 79% 10%, var(--cloud-a), transparent 78%),
    radial-gradient(42% 45% at 11% 84%, var(--cloud-b), transparent 72%),
    radial-gradient(33% 38% at 48% 50%, var(--cloud-c), transparent 76%);
  filter: blur(44px) saturate(0.96);
  opacity: 0.42;
  transition: background 0.8s var(--ease);
}
.work-layers-page[data-open="ez"] .canvas-glow {
  background:
    radial-gradient(48% 52% at 82% 12%, rgba(112, 72, 216, 0.34), transparent 76%),
    radial-gradient(46% 50% at 10% 86%, rgba(255, 152, 110, 0.26), transparent 74%);
}

/* Picker artboard */
.work-layers-page[data-open="none"] {
  --accent-h: inherit;
}
.layer-picker {
  isolation: isolate;
  display: flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(26px, 3.4vw, 44px);
  min-height: max(680px, calc(100vh - 144px));
  height: auto !important;
}
.layer-picker::before {
  z-index: -1 !important;
  background:
    radial-gradient(60% 72% at 12% 82%, var(--cloud-b), transparent 72%),
    radial-gradient(58% 66% at 88% 16%, var(--cloud-a), transparent 72%),
    rgba(247, 245, 240, 0.47) !important;
}
.picker-copy {
  align-self: stretch;
  width: min(100%, 900px);
  margin-inline: auto;
}
.picker-copy .eyebrow {
  margin: 0;
}
.picker-copy h1 {
  margin: 18px 0 0;
  color: var(--type);
  font: 600 clamp(46px, 5.6vw, 82px) / 0.9 Manrope, Arial, sans-serif;
  letter-spacing: -0.075em;
}
.picker-copy h1 span {
  color: var(--muted);
}

/* Drop zone */
.drop-zone {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: min(100%, 640px);
  min-height: clamp(250px, 32vh, 320px);
  padding: 34px 28px 30px;
  overflow: hidden;
  text-align: center;
  border: 1.5px dashed rgba(72, 61, 51, 0.34);
  border-radius: 24px;
  background: rgba(248, 244, 237, 0.42);
  backdrop-filter: blur(8px);
  transition:
    border-color 0.3s var(--ease),
    background 0.3s var(--ease),
    transform 0.4s var(--ease),
    box-shadow 0.4s var(--ease);
}
.drop-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-bottom: 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.5);
  transition: transform 0.4s var(--ease);
}
.drop-icon svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: #4b433d;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.drop-title {
  margin: 0;
  color: var(--type);
  font: 600 clamp(18px, 1.6vw, 22px) / 1.15 Manrope, Arial, sans-serif;
  letter-spacing: -0.04em;
}
.drop-hint {
  margin: 10px 0 0;
  color: #625950;
  font: 10px DM Mono, monospace;
  letter-spacing: 0.02em;
}
.drop-files {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 24px;
  transition: opacity 0.25s var(--ease);
}
.drop-file {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  min-width: 196px;
  padding: 7px 14px 7px 7px;
  text-align: left;
  color: var(--type);
  border: 1px solid rgba(45, 38, 34, 0.2);
  border-radius: 999px;
  background: rgba(248, 244, 237, 0.7);
  transition:
    transform 0.3s var(--ease),
    border-color 0.3s var(--ease),
    background 0.3s var(--ease);
}
.drop-file > span:nth-child(2) {
  display: grid;
  flex: 1;
  gap: 2px;
}
.drop-file strong {
  font: 600 13px Manrope, Arial, sans-serif;
  letter-spacing: -0.02em;
}
.drop-file small {
  color: #625950;
  font: 9px DM Mono, monospace;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.drop-file b {
  font: 15px Georgia, serif;
}
.drop-file:hover,
.drop-file:focus-visible {
  transform: translateY(-3px);
  border-color: rgba(32, 29, 27, 0.6);
  background: rgba(248, 244, 237, 0.95);
}
.file-thumb {
  width: 30px;
  height: 30px;
  flex: none;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.4);
}
.drop-progress {
  position: absolute;
  left: 28px;
  right: 28px;
  bottom: 26px;
  height: 3px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(72, 61, 51, 0.12);
  opacity: 0;
}
.drop-progress i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--type);
}

/* Drag states */
.is-dragging-layer .drop-zone {
  border-color: rgba(32, 29, 27, 0.55);
  animation: dropZoneBreath 1.6s ease-in-out infinite alternate;
}
.drop-zone.is-over {
  border-style: solid;
  border-color: var(--type);
  background: color-mix(in srgb, var(--cloud-a) 40%, rgba(248, 244, 237, 0.8));
  box-shadow: 0 22px 60px rgba(62, 48, 41, 0.14);
  transform: scale(1.015);
  animation: none;
}
.drop-zone.is-over .drop-icon {
  transform: translateY(4px) scale(1.08);
}
.drop-zone.is-over .drop-files,
.drop-zone.is-opening .drop-files {
  opacity: 0;
  pointer-events: none;
}
.drop-zone.is-opening {
  border-style: solid;
  border-color: var(--type);
}
.drop-zone.is-opening .drop-progress {
  opacity: 1;
}
.drop-zone.is-opening .drop-progress i {
  animation: dropProgress 0.6s var(--ease) forwards;
}
.stage.is-drop-target::after {
  content: "Drop to switch file";
  position: absolute;
  inset: 14px;
  z-index: 30;
  display: grid;
  place-items: center;
  border: 1.5px dashed rgba(255, 255, 255, 0.7);
  border-radius: 28px;
  background: rgba(20, 18, 17, 0.32);
  color: #fff;
  font: 11px DM Mono, monospace;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  pointer-events: none;
}
@keyframes dropZoneBreath {
  to {
    background: rgba(248, 244, 237, 0.7);
  }
}
@keyframes dropProgress {
  to {
    width: 100%;
  }
}

.panel-pointer {
  position: absolute;
  right: clamp(32px, 7vw, 118px);
  bottom: clamp(52px, 7vh, 72px);
  margin: 0;
  color: #625950;
  font: 10px DM Mono, monospace;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.panel-pointer b {
  margin-left: 8px;
  font-weight: 400;
}

/* Document tab for the open file */
.file-tab {
  gap: 8px;
  padding-right: 8px;
}
.file-tab[hidden] {
  display: none !important;
}
.file-tab-name {
  color: inherit;
}
.file-tab-close {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  margin-left: 4px;
  border-radius: 4px;
  background: transparent;
  color: #949494;
  font: 13px/1 DM Mono, monospace;
}
.file-tab-close:hover,
.file-tab-close:focus-visible {
  background: #4a4a4a;
  color: #fff;
}

/* Layers panel */
.panel-hint {
  color: #a9a6a1;
  font: 9px DM Mono, monospace;
  letter-spacing: 0.04em;
}
.layer-folder {
  display: grid;
  grid-template-columns: 12px 16px 1fr auto;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  margin: 0;
  padding: 4px 10px;
  color: #d5d2cc;
  font-size: 11px;
}
.folder-caret {
  color: #b5b2ad;
  font-size: 11px;
}
.folder-icon {
  position: relative;
  width: 14px;
  height: 10px;
  border: 1px solid #a9a6a1;
  border-radius: 2px;
}
.folder-icon::before {
  content: "";
  position: absolute;
  left: -1px;
  top: -4px;
  width: 6px;
  height: 3px;
  border: 1px solid #a9a6a1;
  border-bottom: 0;
  border-radius: 2px 2px 0 0;
}
.layer-folder-link {
  margin-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  color: #b5b2ad;
  transition: color 0.25s var(--ease), background 0.25s var(--ease);
}
.layer-folder-link b {
  color: #949494;
  font: 11px Georgia, serif;
}
.layer-folder-link:hover,
.layer-folder-link:focus-visible {
  color: #f0ede7;
  background: rgba(255, 255, 255, 0.05);
}
.work-layer {
  grid-template-columns: 20px 30px 1fr 14px;
  min-height: 52px;
  padding-left: 22px;
  cursor: grab;
  user-select: none;
}
.work-layer:active {
  cursor: grabbing;
}
.work-layer.active:not(.is-open) {
  background: transparent;
  color: #b5b2ad;
}
.work-layer:hover,
.work-layer:focus-visible {
  background: #4a4a4a;
  color: #f0ede7;
}
.work-layer.is-open {
  background: #505050;
  color: #f0ede7;
  box-shadow: inset 2px 0 0 #f0ede7;
}
.work-layer .layer-thumb {
  width: 28px;
  height: 28px;
  border-radius: 3px;
}
.work-layer-name {
  display: grid;
  gap: 3px;
  font-weight: 600;
}
.work-layer-name small {
  color: #a9a6a1;
  font: 400 9px DM Mono, monospace;
  letter-spacing: 0.02em;
}
.layer-grip {
  color: #8a8885;
  font-size: 13px;
  font-weight: 400;
}
.work-layer:hover .layer-grip {
  color: #f0ede7;
}
.thumb-ez {
  background:
    url("assets/ez-customers/ez-logo-white.svg") center / 64% no-repeat,
    linear-gradient(135deg, #7048d8, #2a1f48 58%, #ff986e);
}
.thumb-harper {
  background:
    url("Harper AI Brand Identity Package/02_Logo_Files/01_Primary_White/harper-ai-logo-primary-white-256.png") center / 70% no-repeat,
    radial-gradient(circle at 50% 40%, #3f5a49, #050707 72%);
}

/* Narrower screens: an open file gets the full canvas; below 900px the panel is hidden and the picker pills do the work. */
@media (max-width: 1180px) and (min-width: 901px) {
  .work-layers-page:not([data-open="none"]) .workspace {
    grid-template-columns: 48px minmax(0, 1fr) !important;
  }
  .work-layers-page:not([data-open="none"]) .panel-column {
    display: none;
  }
}
@media (max-width: 900px) {
  .work-layers-page .panel-column,
  .panel-pointer {
    display: none;
  }
  .picker-copy {
    padding-inline: 22px;
  }
}
@media (max-width: 650px), (max-width: 900px) and (max-height: 500px) {
  .layer-picker {
    min-height: calc(100dvh - 140px);
    padding: 70px 24px 64px !important;
  }
  .drop-zone {
    min-height: 0;
    padding: 28px 18px 30px;
  }
  .drop-file {
    width: 100%;
  }
}
@media (prefers-reduced-motion: reduce) {
  .is-dragging-layer .drop-zone {
    animation: none;
  }
}
