/* ---------------------------------------------------------------------------
   Deck builder — gallery, slide sorter, inputs, preview.

   The preview is always light, whatever the app theme is. It stands in for a
   printed page, and a dark preview of a white page teaches the advisor the
   wrong thing about what they are about to hand a client.
   --------------------------------------------------------------------------- */

.v2-deck-wrap { padding: 20px 24px 40px; }

.v2-deck-actions { display: flex; gap: 8px; align-items: center; }

.v2-deck-panes {
  display: grid;
  grid-template-columns: 280px 1fr 300px;
  gap: 16px;
  align-items: start;
  margin-top: 16px;
}

.v2-deck-gallery,
.v2-deck-sorter,
.v2-deck-inputs {
  background: var(--card-bg, #fff);
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 8px;
  padding: 14px;
}

.v2-deck-pane-title {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--muted);
}

/* Gallery */
.v2-deck-search {
  width: 100%;
  margin-bottom: 10px;
  padding: 6px 8px;
  font-size: 12px;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 6px;
}
.v2-deck-card {
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 6px;
  padding: 10px;
  margin-bottom: 8px;
}
.v2-deck-card.is-blocked { opacity: .6; }
.v2-deck-card-title { font-size: 13px; font-weight: 600; }
.v2-deck-card-desc { font-size: 11px; color: var(--muted); margin: 4px 0 8px; line-height: 1.4; }
.v2-deck-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.v2-deck-tag {
  font-size: 10px; text-transform: uppercase; letter-spacing: .04em;
  color: var(--muted); background: var(--bg-offset, #f3f4f6);
  border-radius: 10px; padding: 2px 8px;
}
.v2-deck-add {
  background: var(--accent, #3b82f6); color: #fff; border: none;
  border-radius: 5px; padding: 4px 10px; font-size: 11px; font-weight: 600; cursor: pointer;
}
.v2-deck-add[disabled] { opacity: .6; cursor: default; }
.v2-deck-blocked { font-size: 10px; color: var(--muted); }

/* Slide sorter */
.v2-deck-empty {
  padding: 28px 16px; text-align: center; font-size: 12px; color: var(--muted);
  border: 1px dashed var(--border, #e5e7eb); border-radius: 6px;
}
.v2-deck-slides { list-style: none; margin: 0; padding: 0; }
.v2-deck-slide {
  display: flex; align-items: center; gap: 10px;
  border: 1px solid var(--border, #e5e7eb); border-radius: 6px;
  padding: 10px; margin-bottom: 8px;
}
.v2-deck-slide-num {
  width: 26px; height: 26px; flex: 0 0 26px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%; background: var(--bg-offset, #f3f4f6);
  font-size: 11px; font-weight: 700; color: var(--muted);
}
.v2-deck-slide-body { flex: 1; min-width: 0; }
.v2-deck-slide-title { font-size: 13px; font-weight: 600; }
.v2-deck-caption {
  width: 100%; margin-top: 4px; padding: 4px 6px; font-size: 11px;
  border: 1px solid var(--border, #e5e7eb); border-radius: 4px;
}
.v2-deck-slide-actions { display: flex; gap: 4px; }
.v2-deck-slide-actions button {
  width: 24px; height: 24px; border: 1px solid var(--border, #e5e7eb);
  background: none; border-radius: 4px; cursor: pointer; color: var(--muted);
}
.v2-deck-slide-actions button:hover { border-color: var(--accent); color: var(--accent); }

/* Inputs */
.v2-deck-inputs label { display: block; font-size: 11px; color: var(--muted); margin-bottom: 10px; }
.v2-deck-inputs input,
.v2-deck-inputs textarea {
  width: 100%; margin-top: 3px; padding: 6px 8px; font-size: 12px;
  border: 1px solid var(--border, #e5e7eb); border-radius: 5px;
  font-family: inherit;
}
.v2-deck-branding { border-top: 1px solid var(--border, #e5e7eb); margin-top: 6px; padding-top: 10px; }
.v2-deck-branding h4 { margin: 0 0 6px; font-size: 12px; }
.v2-deck-branding p { margin: 0 0 6px; font-size: 12px; }
.v2-deck-swatches { display: flex; gap: 6px; margin-bottom: 6px; }
.v2-deck-swatch {
  width: 22px; height: 22px; border-radius: 4px; border: 1px solid rgba(0, 0, 0, .15);
}

/* Preview — always light, because it stands in for paper */
.v2-deck-preview-overlay {
  position: fixed; inset: 0; z-index: 1200;
  background: rgba(15, 23, 42, .6);
  display: flex; align-items: flex-start; justify-content: center;
  overflow: auto; padding: 24px;
}
.v2-deck-preview { width: min(1000px, 100%); }
.v2-deck-preview-bar {
  display: flex; align-items: center; justify-content: space-between;
  background: #06456e; color: #fff; padding: 9px 14px;
  border-radius: 6px 6px 0 0; font-size: 12px;
}
.v2-deck-preview-bar button {
  background: transparent; color: #fff; border: 1px solid rgba(255, 255, 255, .45);
  border-radius: 4px; padding: 4px 10px; font-size: 12px; cursor: pointer;
}
.v2-deck-preview-body { background: #dfe5eb; padding: 16px; border-radius: 0 0 6px 6px; }
.v2-deck-page {
  background: #fff; color: #414141; border-top: 6px solid #0865a1;
  padding: 22px 26px; margin-bottom: 14px; min-height: 380px;
  display: flex; flex-direction: column;
}
.v2-deck-page-cover { justify-content: center; }
.v2-deck-cover-logo { max-height: 46px; max-width: 200px; margin-bottom: 14px; }
.v2-deck-cover-eyebrow {
  margin: 0 0 8px; font-size: 10px; font-weight: 700; letter-spacing: .16em;
  text-transform: uppercase; color: #64748b;
}
.v2-deck-page h2 { margin: 0; color: #06456e; font-family: Georgia, serif; font-size: 30px; }
.v2-deck-cover-dek { margin: 10px 0; font: 15px/1.44 Georgia, serif; color: #344054; }
.v2-deck-cover-meta { margin: 0; font-size: 11px; color: #64748b; }
.v2-deck-page-head { border-bottom: 2px solid #d7e3ee; padding-bottom: 8px; margin-bottom: 12px; }
.v2-deck-page-head h4 { margin: 0; color: #06456e; font-family: Georgia, serif; font-size: 18px; }
.v2-deck-page-head p { margin: 4px 0 0; font-size: 11px; color: #64748b; }
.v2-deck-page-body { flex: 1; }
.v2-deck-page-foot {
  border-top: 1px solid #d7e3ee; margin-top: 12px; padding-top: 6px;
  font-size: 10px; color: #64748b;
}
.v2-deck-disclosure { font-size: 11px; line-height: 1.5; color: #414141; }

.v2-deck-exhibit-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.v2-deck-exhibit-table th {
  text-align: left; background: #f1f7fb; color: #06456e; padding: 6px 8px;
  border-bottom: 1px solid #d7e3ee;
}
.v2-deck-exhibit-table td { padding: 6px 8px; border-bottom: 1px solid #eef2f6; }
.v2-deck-exhibit-bullets { margin: 0; padding-left: 20px; font-size: 13px; line-height: 1.7; }
.v2-deck-exhibit-text { font: 14px/1.6 Georgia, serif; color: #344054; }

.dark-theme .v2-deck-gallery,
.dark-theme .v2-deck-sorter,
.dark-theme .v2-deck-inputs { background: #111520; border-color: #1e2433; }
.dark-theme .v2-deck-card,
.dark-theme .v2-deck-slide { border-color: #1e2433; }

@media (max-width: 1100px) {
  .v2-deck-panes { grid-template-columns: 1fr; }
}
