/* GothamDev — Doc Drop (code_candy LOCAL → SERVER + fly animation) */

.doc-drop-section {
  padding: clamp(56px, 8vw, 100px) 0;
  background: #050505;
  color: #fafafa;
}
.doc-drop-section .mosa-section-head {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 28px;
}
.doc-drop-section .mosa-label { color: #7dff9a; }
.doc-drop-section .mosa-section-head h2 {
  color: #fff;
  letter-spacing: -0.03em;
}
.doc-drop-section .mosa-section-head h2 em {
  font-style: normal;
  color: #a1a1aa;
}
.doc-drop-section .mosa-section-head p {
  color: #a1a1aa;
  max-width: 54ch;
  margin-left: auto;
  margin-right: auto;
}

.doc-drop {
  --dd-accent: #7dff9a;
  --dd-muted: #71717a;
  --dd-text: #fafafa;
  --dd-border: rgba(125, 255, 154, 0.18);
  --dd-panel: #0b0d11;
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(260px, 0.9fr);
  gap: 14px;
  isolation: isolate;
}

html[data-theme="light"] .doc-drop {
  --dd-muted: #64748b;
  --dd-text: #0f172a;
  --dd-border: rgba(22, 163, 74, 0.22);
  --dd-panel: #f4f6f8;
}

@media (max-width: 860px) {
  .doc-drop { grid-template-columns: 1fr; }
}

.doc-drop__main,
.doc-drop__side {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 340px;
  border-radius: 20px;
  border: 1px solid var(--dd-border);
  background: var(--dd-panel);
  box-shadow:
    0 0 0 1px rgba(125, 255, 154, 0.04),
    0 18px 50px rgba(0, 0, 0, 0.35);
  overflow: hidden;
  transition: border-color 0.35s ease, box-shadow 0.35s ease;
}

.doc-drop.is-dragging .doc-drop__main,
.doc-drop.is-flying .doc-drop__main {
  border-color: rgba(125, 255, 154, 0.55);
  box-shadow:
    0 0 0 1px rgba(125, 255, 154, 0.2),
    0 0 40px rgba(125, 255, 154, 0.12),
    0 18px 50px rgba(0, 0, 0, 0.35);
}
.doc-drop.is-receiving .doc-drop__side {
  border-color: rgba(125, 255, 154, 0.55);
  box-shadow:
    0 0 0 1px rgba(125, 255, 154, 0.2),
    0 0 40px rgba(125, 255, 154, 0.14),
    0 18px 50px rgba(0, 0, 0, 0.35);
}

.doc-drop__main {
  padding: 16px 16px 14px;
  background:
    radial-gradient(ellipse 70% 45% at 15% 0%, rgba(125, 255, 154, 0.08), transparent 55%),
    var(--dd-panel);
}
.doc-drop__side {
  padding: 16px;
  background:
    radial-gradient(ellipse 60% 40% at 80% 100%, rgba(125, 255, 154, 0.05), transparent 50%),
    var(--dd-panel);
}

/* Format tags = rail steps */
.doc-drop__rail {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}
.doc-drop__rail-btn {
  appearance: none;
  padding: 6px 11px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.35);
  color: var(--dd-muted);
  font-family: var(--font-mono, ui-monospace, SFMono-Regular, Menlo, monospace);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: default;
  transition: color 0.25s ease, border-color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}
html[data-theme="light"] .doc-drop__rail-btn {
  background: rgba(255, 255, 255, 0.85);
  border-color: rgba(15, 23, 42, 0.12);
}
.doc-drop__rail-btn.is-done,
.doc-drop__rail-btn.is-current {
  color: var(--dd-accent);
  border-color: rgba(125, 255, 154, 0.45);
  background: rgba(125, 255, 154, 0.1);
}
.doc-drop__rail-btn.is-current {
  transform: translateY(-1px);
  box-shadow: 0 0 0 3px rgba(125, 255, 154, 0.14), 0 0 18px rgba(125, 255, 154, 0.25);
  animation: dd-tag-pulse 1s ease infinite;
}
@keyframes dd-tag-pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(125, 255, 154, 0.14), 0 0 12px rgba(125, 255, 154, 0.2); }
  50% { box-shadow: 0 0 0 5px rgba(125, 255, 154, 0.08), 0 0 22px rgba(125, 255, 154, 0.35); }
}

.doc-drop__zone {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 210px;
  padding: 28px 20px;
  border-radius: 16px;
  border: 1.5px dashed rgba(125, 255, 154, 0.22);
  background: rgba(0, 0, 0, 0.18);
  cursor: pointer;
  transition: border-color 0.25s ease, background 0.25s ease, transform 0.3s ease, box-shadow 0.3s ease;
}
html[data-theme="light"] .doc-drop__zone {
  background: rgba(255, 255, 255, 0.55);
}
.doc-drop__zone:hover,
.doc-drop__zone:focus-visible {
  outline: none;
  border-color: rgba(125, 255, 154, 0.55);
  background: rgba(125, 255, 154, 0.05);
}
.doc-drop.is-dragging .doc-drop__zone {
  border-style: solid;
  border-color: var(--dd-accent);
  background: rgba(125, 255, 154, 0.1);
  box-shadow: inset 0 0 40px rgba(125, 255, 154, 0.08);
  transform: scale(1.01);
}

.doc-drop__input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.doc-drop__icon {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: rgba(125, 255, 154, 0.12);
  border: 1px solid rgba(125, 255, 154, 0.3);
  color: var(--dd-accent);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.doc-drop.is-dragging .doc-drop__icon,
.doc-drop.is-flying .doc-drop__icon {
  transform: translateY(-8px) scale(1.08);
}
.doc-drop__icon svg { width: 28px; height: 28px; }

.doc-drop__cue {
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--dd-text);
  text-align: center;
}
.doc-drop__hint {
  font-size: 0.76rem;
  color: var(--dd-muted);
  text-align: center;
  max-width: 320px;
  line-height: 1.45;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.doc-drop__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
  font-size: 0.68rem;
  font-family: var(--font-mono, ui-monospace, monospace);
  color: var(--dd-muted);
  letter-spacing: 0.04em;
}
.doc-drop__status[data-tone="ok"] { color: var(--dd-accent); }
.doc-drop__status[data-tone="err"] { color: #fb7185; }
.doc-drop__powered { opacity: 0.7; }

/* ATTACH panel */
.doc-drop__side-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.doc-drop__side-title {
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--dd-text);
  font-family: var(--font-mono, ui-monospace, monospace);
}
.doc-drop__side-count {
  font-size: 0.7rem;
  color: var(--dd-muted);
  font-family: var(--font-mono, ui-monospace, monospace);
}

.doc-drop__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  overflow: auto;
  max-height: 220px;
  min-height: 130px;
}
.doc-drop__empty {
  margin: auto 0;
  padding: 28px 14px;
  text-align: center;
  font-size: 0.82rem;
  color: var(--dd-muted);
  line-height: 1.55;
}
.doc-drop__file {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}
.doc-drop__file.is-arrive {
  animation: dd-arrive 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}
html[data-theme="light"] .doc-drop__file {
  background: #fff;
  border-color: rgba(15, 23, 42, 0.08);
}
@keyframes dd-arrive {
  from { opacity: 0; transform: translateX(-18px) scale(0.92); }
  to { opacity: 1; transform: none; }
}
.doc-drop__file-ico {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: rgba(125, 255, 154, 0.12);
  color: var(--dd-accent);
  font-size: 0.65rem;
  font-weight: 800;
}
.doc-drop__file-meta { min-width: 0; }
.doc-drop__file-name {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--dd-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.doc-drop__file-size {
  font-size: 0.68rem;
  color: var(--dd-muted);
}
.doc-drop__file-rm {
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--dd-muted);
  cursor: pointer;
  display: grid;
  place-items: center;
}
.doc-drop__file-rm:hover {
  color: #fb7185;
  background: rgba(251, 113, 133, 0.1);
}

.doc-drop__actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: auto;
  padding-top: 12px;
}
.doc-drop__actions[hidden] {
  display: none !important;
}
.doc-drop__btn,
.doc-drop__cta-link {
  appearance: none;
  display: block;
  width: 100%;
  text-align: center;
  text-decoration: none;
  border: none;
  border-radius: 12px;
  padding: 13px 14px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 0.2s ease, filter 0.2s ease, background 0.2s ease;
}
.doc-drop__cta-link,
.doc-drop__btn {
  background: var(--dd-accent);
  color: #04140a;
  box-shadow: 0 0 24px rgba(125, 255, 154, 0.25);
}
.doc-drop__cta-link:hover,
.doc-drop__btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
}
.doc-drop__btn--ghost {
  background: transparent;
  color: var(--dd-muted);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: none;
}
.doc-drop__btn--ghost:hover {
  color: var(--dd-text);
  background: rgba(255, 255, 255, 0.04);
  filter: none;
}
.doc-drop__btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

/* Flying chip LOCAL → ATTACH */
.doc-drop__flyer {
  position: fixed;
  z-index: 9999;
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 8px;
  align-items: center;
  width: 180px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid rgba(125, 255, 154, 0.55);
  background: #0f1410;
  color: #fafafa;
  box-shadow:
    0 0 0 1px rgba(125, 255, 154, 0.15),
    0 0 30px rgba(125, 255, 154, 0.35),
    0 18px 40px rgba(0, 0, 0, 0.45);
  pointer-events: none;
  will-change: transform, opacity;
  transition:
    transform 0.85s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.35s ease;
}
.doc-drop__flyer-ico {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: rgba(125, 255, 154, 0.15);
  color: var(--dd-accent);
  font-size: 0.62rem;
  font-weight: 800;
}
.doc-drop__flyer-name {
  font-size: 0.72rem;
  font-weight: 650;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.doc-drop__flyer.is-go {
  opacity: 0.15;
  transform: scale(0.55);
}

/* Invisible rail trail between panels */
.doc-drop__trail {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 2px;
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  background: linear-gradient(90deg, transparent, rgba(125, 255, 154, 0.55), transparent);
  transform: translateY(-50%);
  transition: opacity 0.3s ease;
}
.doc-drop.is-flying .doc-drop__trail {
  opacity: 1;
  animation: dd-trail 0.9s ease;
}
@keyframes dd-trail {
  from { transform: translateY(-50%) scaleX(0.2); opacity: 0; }
  40% { opacity: 1; }
  to { transform: translateY(-50%) scaleX(1); opacity: 0.35; }
}

.contact-form .doc-drop { margin-top: 4px; }
.fc-doc-drop { margin-bottom: 20px; }

@media (prefers-reduced-motion: reduce) {
  .doc-drop__rail-btn.is-current,
  .doc-drop__file.is-arrive,
  .doc-drop__flyer,
  .doc-drop__trail,
  .doc-drop__zone,
  .doc-drop__icon {
    animation: none !important;
    transition: none !important;
  }
}
