/* Cuts — YouTube Shorts sharing. Companion to create.css/styles.css;
   only styles specific to Cuts live here (feed grid, cards, the
   share-a-cut form's preview card, and the full-screen viewer). */

/* ------------------------- "Share a Cut" chooser card ------------------------- */
.np-type-card.np-type-cut .np-type-icon { background: #ffe9f0; color: #d1547e; box-shadow: 0 6px 14px rgba(209,84,126,.18); }
body[data-theme="dark"] .np-type-card.np-type-cut .np-type-icon { background: rgba(209,84,126,.18); }

/* ---------------------------- Cuts feed grid ---------------------------- */
.cuts-feed-section { margin-top: 4px; }
.cuts-feed-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}
@media (max-width: 570px) { .cuts-feed-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; } }

/* Cards are full-bleed 9:16 tiles — title/author sit in an overlay over the
   thumbnail (Shorts/Reels-style grid) rather than a separate footer block,
   so the grid reads as a clean wall of video tiles. */
.cut-card {
  background: #12141c;
  border: 0;
  border-radius: 16px;
  box-shadow: 0 10px 26px rgba(19,23,41,.1);
  overflow: hidden;
  padding: 0;
  position: relative;
  text-align: left;
  transition: box-shadow .18s ease, transform .18s ease;
}
.cut-card:hover { box-shadow: 0 16px 36px rgba(19,23,41,.2); transform: translateY(-2px); }
.cut-card:hover .cut-card-thumb img { transform: scale(1.04); }
.cut-card:hover .cut-card-play { background: rgba(0,0,0,.62); transform: translate(-50%, -50%) scale(1.06); }
body[data-theme="dark"] .cut-card { box-shadow: 0 10px 26px rgba(0,0,0,.45); }

/* 9:16 — the same vertical shape as the Short itself */
.cut-card-thumb { aspect-ratio: 9 / 16; background: #12141c; overflow: hidden; position: relative; width: 100%; }
.cut-card-thumb img { display: block; height: 100%; object-fit: cover; transition: transform .3s ease; width: 100%; }
.cut-card-thumb-fallback { align-items: center; color: #545d74; display: flex; height: 100%; justify-content: center; width: 100%; }
.cut-card-thumb-fallback svg, .cut-preview-thumb span svg { fill: none; height: 30px; stroke: currentColor; stroke-width: 1.5; width: 30px; }

.cut-card-badge {
  align-items: center; background: rgba(10,11,18,.55); backdrop-filter: blur(4px); border: 1px solid rgba(255,255,255,.14);
  border-radius: 20px; color: #fff; display: flex; font: 800 8px "DM Mono", monospace; gap: 4px; left: 8px; letter-spacing: .06em;
  padding: 4px 8px 4px 6px; position: absolute; text-transform: uppercase; top: 8px; z-index: 2;
}
.cut-card-badge::before { background: linear-gradient(135deg, #ff5c8a, #6a5cf0); border-radius: 50%; content: ''; height: 6px; width: 6px; }

.cut-card-play {
  align-items: center; background: rgba(0,0,0,.42); backdrop-filter: blur(2px);
  border-radius: 50%; color: #fff; display: flex; height: 38px;
  justify-content: center; left: 50%; position: absolute;
  top: 50%; transform: translate(-50%, -50%); transition: background .18s ease, transform .18s ease; width: 38px; z-index: 2;
}
.cut-card-play svg { fill: currentColor; height: 15px; margin-left: 2px; width: 15px; }

/* Bottom scrim + overlaid title/author — text stays legible over any thumbnail */
.cut-card-scrim {
  background: linear-gradient(to top, rgba(6,7,14,.92) 0%, rgba(6,7,14,.55) 32%, rgba(6,7,14,0) 60%);
  bottom: 0; height: 62%; left: 0; pointer-events: none; position: absolute; right: 0; z-index: 1;
}
.cut-card-copy { bottom: 0; display: grid; gap: 5px; left: 0; padding: 10px 10px 11px; position: absolute; right: 0; z-index: 2; }
.cut-card-title {
  color: #fff; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2;
  overflow: hidden; font-size: 11.5px; font-weight: 600; letter-spacing: -.01em; line-height: 1.35;
}
.cut-card-author { align-items: center; color: rgba(255,255,255,.78); display: flex; font: 700 9.5px "DM Mono", monospace; gap: 5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cut-card-avatar { flex: 0 0 auto; font-size: 8px; height: 16px; width: 16px; }

.empty-search#cutsFeedEmpty { grid-column: 1 / -1; }

/* ---------------------------- Share a Cut form ---------------------------- */
.cut-share-form .cut-step { margin-bottom: 0; }
.cut-error { background: #fdedf0; border-radius: 10px; color: #b12f49; font-size: 10.5px; margin: 10px 0 0; padding: 10px 12px; }
body[data-theme="dark"] .cut-error { background: rgba(226,67,101,.13); }

.cut-preview-card { overflow: hidden; padding: 0; text-align: center; }
.cut-preview-thumb { aspect-ratio: 9 / 16; background: #12141c; margin: 0 auto; max-width: 220px; overflow: hidden; }
.cut-preview-thumb img { display: block; height: 100%; object-fit: cover; width: 100%; }
.cut-preview-thumb span { align-items: center; color: #4b5568; display: flex; font-size: 34px; height: 100%; justify-content: center; }
.cut-preview-card h3 { font-size: 15px; margin: 16px 20px 6px; }
.cut-preview-title { color: #16192b; display: block; font-size: 13px; letter-spacing: -.02em; line-height: 1.4; margin: 0 20px 6px; }
body[data-theme="dark"] .cut-preview-title { color: #eef0f7; }
.cut-preview-description { color: #6c7488; font-size: 10.5px; line-height: 1.6; margin: 0 20px 18px; text-align: left; }

/* ------------------------------ Watching a Cut ------------------------------ */
/* Full-screen Cuts viewer — a vertical snap-scroll feed (Shorts/Reels-
   style): each Cut is a full-height slide, and scrolling down/up moves to
   the next/previous one. #cutFullscreenBody is shared markup with the
   regular project viewer (where it's just a padded content column) — here
   it becomes the scroll *track* instead. */
.cut-fullscreen-page.cut-fullscreen-page { overflow: hidden; }
.cut-fullscreen-page .project-fullscreen-body,
#cutFullscreenBody {
  height: 100%;
  margin: 0;
  max-width: none;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  padding: 0;
  scroll-snap-type: y mandatory;
  -webkit-overflow-scrolling: touch;
}
.cut-fs-slide {
  align-items: center;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: 66px 16px 50px;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  width: 100%;
}
.cut-fs-embed-wrap {
  aspect-ratio: 9 / 16; background: #000; border-radius: 18px; box-shadow: 0 22px 55px rgba(0,0,0,.5);
  flex-shrink: 0; margin: 0 auto; max-height: 72vh; max-width: 460px; overflow: hidden; position: relative; width: 100%;
}
.cut-fs-embed-poster { background-position: center; background-size: cover; height: 100%; left: 0; position: absolute; top: 0; width: 100%; }
.cut-fs-embed { background: transparent; border: 0; display: block; height: 100%; left: 0; position: absolute; top: 0; width: 100%; }
.cut-fs-mute-toggle {
  align-items: center; background: rgba(10,11,18,.55); backdrop-filter: blur(6px); border: 1px solid rgba(255,255,255,.14);
  border-radius: 50%; bottom: 14px; color: #fff; cursor: pointer; display: flex; height: 38px; justify-content: center;
  position: absolute; right: 14px; transition: background .15s ease, transform .15s ease; width: 38px; z-index: 3;
}
.cut-fs-mute-toggle:hover { background: rgba(10,11,18,.75); transform: scale(1.05); }
.cut-fs-mute-toggle svg { height: 17px; width: 17px; }
.cut-fs-mute-toggle .cut-mute-x { display: none; }
.cut-fs-mute-toggle .cut-mute-waves { display: block; }
.cut-fs-mute-toggle.is-muted .cut-mute-x { display: block; }
.cut-fs-mute-toggle.is-muted .cut-mute-waves { display: none; }
.cut-fs-scroll-hint {
  align-items: center; animation: cutFsHintBounce 1.6s ease-in-out infinite; bottom: 16px; color: rgba(255,255,255,.72);
  display: flex; flex-direction: column; font-size: 9.5px; font-weight: 800; gap: 1px; left: 50%; letter-spacing: .07em;
  pointer-events: none; position: absolute; text-shadow: 0 2px 8px rgba(0,0,0,.5); text-transform: uppercase; transform: translateX(-50%); z-index: 2;
}
.cut-fs-scroll-hint svg { height: 16px; stroke: currentColor; width: 16px; }
@keyframes cutFsHintBounce { 0%, 100% { transform: translate(-50%, 0); opacity: .7; } 50% { transform: translate(-50%, 5px); opacity: 1; } }
.cut-fs-content { max-width: 460px; padding: 18px 4px 0; width: 100%; }
.cut-fs-title { font-size: 18px; letter-spacing: -.045em; line-height: 1.3; margin: 0 0 10px; }
.cut-fs-description { color: #b6bbc9; font-size: 12px; line-height: 1.65; margin: 0 0 16px; }
.cut-fs-author-row { align-items: center; cursor: pointer; display: flex; gap: 10px; margin-bottom: 16px; }
.cut-fs-author-row div { display: grid; gap: 2px; }
.cut-fs-author-row strong { font-size: 12.5px; }
.cut-fs-author-row small { color: #838aa0; font-size: 10px; }
.cut-fs-actions { align-items: center; display: flex; gap: 10px; }
.cut-fs-youtube-link {
  border: 1px solid rgba(255,255,255,.16); border-radius: 10px; color: #e8e9ef;
  display: inline-flex; font-size: 11px; font-weight: 700; padding: 10px 14px;
}
.cut-fs-youtube-link:hover { background: rgba(255,255,255,.06); }
.cut-fs-bookmark-button {
  align-items: center; background: transparent; border: 1px solid rgba(255,255,255,.16); border-radius: 10px;
  color: #e8e9ef; cursor: pointer; display: inline-flex; flex: 0 0 auto; font-size: 11px; font-weight: 700;
  gap: 6px; padding: 10px 14px; transition: background .15s ease, border-color .15s ease;
}
.cut-fs-bookmark-button:hover { background: rgba(255,255,255,.06); }
.cut-fs-bookmark-button svg { fill: none; height: 15px; width: 15px; }
.cut-fs-bookmark-button.saved { background: #fff; border-color: #fff; color: #16192b; }
.cut-fs-bookmark-button.saved svg { fill: currentColor; }
@media (max-width: 570px) {
  .cut-fs-slide { padding: 60px 14px 42px; }
  .cut-fs-embed-wrap { max-height: 66vh; }
}
