.drop-zone {
  min-height: 220px;
  display: grid;
  place-content: center;
  gap: 8px;
  text-align: center;
  border: 2px dashed rgba(116, 130, 255, 0.42);
  border-radius: 18px;
  background: rgba(116, 130, 255, 0.05);
  cursor: pointer;
}
.drop-zone.dragging {
  border-color: #aeb7ff;
  background: rgba(116, 130, 255, 0.12);
}
.drop-zone input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}
.drop-zone strong {
  font-size: 1.2rem;
}
.drop-zone span {
  color: var(--tool-muted);
}
.editor-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.5fr);
  gap: 24px;
}
.preview-shell {
  display: grid;
  place-items: center;
  min-height: 360px;
  overflow: hidden;
  border-radius: 16px;
  background: #05070d;
}
.preview-shell video {
  display: block;
  max-width: 100%;
  max-height: 560px;
}
.trim-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto;
  align-items: end;
  gap: 8px;
  margin-top: 15px;
}
.trim-row .tool-button {
  padding-inline: 12px;
}
.toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--tool-muted);
}
.toggle input {
  width: 20px;
  height: 20px;
}
.progress {
  height: 12px;
  margin-top: 22px;
  overflow: hidden;
  border-radius: 999px;
  background: #0b1020;
}
.progress span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, #7482ff, #45d39a);
  transition: width 0.15s;
}
.result-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 18px;
  padding: 18px;
  border: 1px solid rgba(69, 211, 154, 0.28);
  border-radius: 14px;
  background: rgba(69, 211, 154, 0.07);
}
.result-box p {
  margin: 3px 0 0;
}
@media (max-width: 800px) {
  .editor-layout {
    grid-template-columns: 1fr;
  }
  .preview-shell {
    min-height: 220px;
  }
  .trim-row {
    grid-template-columns: 1fr 1fr;
  }
  .result-box {
    align-items: stretch;
    flex-direction: column;
  }
}

/* Light theme component details */
body[data-theme="light"] .drop-zone {
  background: rgba(88, 101, 242, 0.04);
}
body[data-theme="light"] .drop-zone.dragging {
  background: rgba(88, 101, 242, 0.1);
}
body[data-theme="light"] .progress {
  background: #e6e9f5;
}
.publish-panel {
  display: grid;
  grid-template-columns: minmax(220px, 0.55fr) minmax(0, 1.45fr);
  gap: 24px;
  margin-top: 22px;
  padding: 22px;
  border: 1px solid rgba(116, 130, 255, 0.3);
  border-radius: 16px;
  background: rgba(116, 130, 255, 0.06);
}
.publish-panel h2 {
  margin-bottom: 8px;
}
.publish-panel textarea {
  resize: vertical;
}
.publish-consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--tool-muted);
  font-size: 0.84rem;
}
.publish-consent input {
  flex: 0 0 auto;
  width: 19px;
  height: 19px;
  margin-top: 3px;
}
.clip-create-actions {
  display: flex;
  gap: 10px;
}
@media (max-width: 800px) {
  .publish-panel {
    grid-template-columns: 1fr;
  }
}
body[data-theme="light"] .publish-panel {
  background: rgba(88, 101, 242, 0.05);
}
.embedded-editor {
  padding-left: 0 !important;
  background: var(--tool-bg);
}
.embedded-editor > .lpe-sidebar,
.embedded-editor > .lpe-sidebar-toggle,
.embedded-editor > .lpe-sidebar-backdrop,
.embedded-editor > .lpe-header,
.embedded-editor > header,
.embedded-editor > .site-footer {
  display: none !important;
}
.embedded-editor .tool-page {
  width: min(1180px, calc(100% - 28px));
  padding: 22px 0 50px;
}
.embedded-editor .tool-hero {
  display: none;
}
.embedded-editor .tool-grid {
  gap: 14px;
}
/* Embedded function-only view */
html.embed-mode body {
  padding-left: 0 !important;
  min-width: 0;
  background: var(--tool-bg);
}
html.embed-mode body > .lpe-sidebar,
html.embed-mode body > .lpe-sidebar-toggle,
html.embed-mode body > .lpe-sidebar-backdrop,
html.embed-mode body > .lpe-header,
html.embed-mode body > header,
html.embed-mode body > .site-footer {
  display: none !important;
}
html.embed-mode .tool-page {
  width: 100%;
  margin: 0;
  padding: 16px;
  background: transparent;
}
html.embed-mode .tool-hero {
  display: none !important;
}
html.embed-mode .tool-grid {
  display: block;
}
html.embed-mode .tool-grid > .tool-panel {
  margin-bottom: 14px;
  border-radius: 14px;
  box-shadow: none;
}
html.embed-mode #drop-zone {
  min-height: 180px;
}
