/* Estúdio de Composições — Fase 6.30. Prefixo fst-. Não altera o restante do portal. */
.fst {
  --fst-navy: #0a192f;
  --fst-ink: #0f172a;
  --fst-muted: #5c6b7a;
  --fst-line: rgba(15, 23, 42, .12);
  --fst-top: 112px;
  --fst-bg: #f3efe6;
  --fst-photo: #efeae1;
  --fst-caption: #0f172a;
  height: calc(100dvh - var(--fst-top));
  max-height: calc(100dvh - var(--fst-top));
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--fst-bg);
  color: var(--fst-ink);
  font: 14px/1.4 inherit;
}
.fst.is-bg-claro { --fst-bg: #f3efe6; --fst-photo: #efeae1; --fst-caption: #0f172a; }
.fst.is-bg-escuro { --fst-bg: #151b24; --fst-photo: #10151c; --fst-caption: #f8fafc; }
.fst.is-bg-neutro { --fst-bg: #d8d2c8; --fst-photo: #cfc8bc; --fst-caption: #1e293b; }
.fst button, .fst input, .fst select, .fst textarea { font: inherit; }
.fst button:focus-visible, .fst input:focus-visible, .fst select:focus-visible, .fst textarea:focus-visible {
  outline: 2px solid #8fb4d9;
  outline-offset: 2px;
}
.fst button:disabled { opacity: .55; cursor: wait; }
.fst-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  padding: 8px 12px;
  background: #fff;
  border-bottom: 1px solid var(--fst-line);
  flex: 0 0 auto;
}
.fst-name {
  min-width: 180px;
  flex: 1 1 220px;
  max-width: 360px;
  border: 0;
  border-bottom: 1px solid transparent;
  background: transparent;
  color: var(--fst-navy);
  font-weight: 700;
  font-size: 16px;
  min-height: 36px;
  padding: 0 4px;
}
.fst-name:hover, .fst-name:focus { border-bottom-color: var(--fst-navy); }
.fst-status {
  border-radius: 999px;
  padding: 4px 10px;
  background: #e8eef5;
  color: var(--fst-navy);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.fst-status.is-ok { background: #e7f6ee; color: #166534; }
.fst-status.is-warn { background: #fff4e8; color: #9a3412; }
.fst-modes, .fst-actions, .fst-tools { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.fst-mode, .fst-btn, .fst-chip {
  border: 1px solid var(--fst-line);
  background: #fff;
  color: var(--fst-ink);
  border-radius: 999px;
  min-height: 36px;
  padding: 0 12px;
  cursor: pointer;
}
.fst-mode:hover, .fst-btn:hover, .fst-chip:hover { border-color: #94a3b8; }
.fst-mode.is-on, .fst-chip.is-on, .fst-btn-primary {
  background: var(--fst-navy);
  border-color: var(--fst-navy);
  color: #fff;
}
.fst-btn-primary:hover { background: #132844; }
.fst-info {
  width: 36px;
  min-height: 36px;
  border-radius: 999px;
  border: 1px solid var(--fst-line);
  background: #fff;
  color: var(--fst-navy);
  font-weight: 800;
  cursor: pointer;
}
.fst-popover {
  position: absolute;
  z-index: 5;
  right: 12px;
  top: 52px;
  width: min(360px, calc(100% - 24px));
  padding: 12px 14px;
  border-radius: 12px;
  background: #fff;
  color: var(--fst-ink);
  box-shadow: 0 12px 32px rgba(15, 23, 42, .16);
  font-size: 13px;
}
.fst-bar { position: relative; }
.fst-work { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(232px, 280px) minmax(0, 1fr); }
.fst.is-explorar .fst-work, .fst.is-biblioteca .fst-work, .fst.is-apresentar .fst-work, .fst.is-wide .fst-work, .fst.is-gallery-off .fst-work {
  grid-template-columns: minmax(0, 1fr);
}
.fst-side, .fst-stage, .fst-scroll { min-height: 0; }
.fst-side {
  overflow: auto;
  background: rgba(255, 255, 255, .72);
  border-right: 1px solid var(--fst-line);
  padding: 10px;
}
.fst-stage { display: flex; flex-direction: column; overflow: hidden; }
.fst-scroll { flex: 1; overflow: auto; padding: 10px 12px 16px; }
.fst-tools { padding: 8px 12px 0; }
.fst-input, .fst-select, .fst-field input, .fst-field textarea {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  min-height: 36px;
  padding: 6px 10px;
  background: #fff;
  color: var(--fst-ink);
}
.fst-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.fst-filters .fst-input, .fst-filters .fst-select { width: auto; min-width: 140px; flex: 1 1 150px; }
.fst-count { margin: 0 0 8px; color: var(--fst-navy); font-size: 13px; font-weight: 700; }
.fst-more {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 0 12px 10px;
  padding: 8px 10px;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, .12);
}
.fst-more-note { color: var(--fst-muted); font-size: 12px; font-weight: 700; }
.fst-grid { display: grid; gap: 10px; }
.fst-grid-compact { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.fst-grid-padrao { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.fst-grid-ampliada { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.fst-card, .fst-lib-card {
  position: relative;
  background: transparent;
  border: 0;
  border-radius: 14px;
  overflow: hidden;
}
.fst-photo-btn {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: var(--fst-photo);
  cursor: zoom-in;
  aspect-ratio: 1 / 1;
}
.fst-grid-ampliada .fst-photo-btn { aspect-ratio: 4 / 5; }
.fst-photo-btn img, .fst-fit {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}
.fst-fit.is-contain { object-fit: contain; background: transparent; }
.fst-fit.is-cover { object-fit: cover; }
.fst-card-body { padding: 8px 2px 0; }
.fst-marca { margin: 0; color: var(--fst-muted); font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.fst-nome { margin: 1px 0 2px; font-size: 15px; line-height: 1.2; }
.fst-meta, .fst-note { margin: 0; color: #334155; font-size: 12px; }
.is-bg-escuro .fst-nome, .is-bg-escuro .fst-meta, .is-bg-escuro .fst-note, .is-bg-escuro .fst-marca { color: var(--fst-caption); }
.fst-card-photo { position: relative; }
.fst-card-actions {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 78px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  opacity: 0;
  transition: opacity .15s ease;
}
.fst-card:hover .fst-card-actions, .fst-card:focus-within .fst-card-actions { opacity: 1; }
.fst-card-actions .fst-btn, .fst-mini {
  min-height: 30px;
  padding: 0 8px;
  font-size: 12px;
  background: rgba(255, 255, 255, .94);
}
.fst-badge {
  display: inline-block;
  margin-top: 4px;
  border-radius: 999px;
  padding: 2px 8px;
  background: rgba(255, 255, 255, .8);
  font-size: 11px;
  font-weight: 700;
}
.fst-badge.is-discard { background: #ffedd5; color: #9a3412; }
.fst-badge.is-place { background: #dbeafe; color: #1e3a8a; }
.fst-compare, .fst-board {
  flex: 1;
  min-height: 0;
  height: 100%;
  display: grid;
  gap: 8px;
}
.fst-compare[data-layout="col-2"], .fst-board[data-layout="duas"], .fst-board[data-layout="principal-1"] { grid-template-columns: 1fr 1fr; }
.fst-compare[data-layout="col-3"], .fst-board[data-layout="tres"] { grid-template-columns: 1fr 1fr 1fr; }
.fst-compare[data-layout="col-4"] { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.fst-compare[data-layout="grade-2x2"], .fst-board[data-layout="grade-2x2"] { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }
.fst-board[data-layout="um"] { grid-template-columns: minmax(0, 1fr); }
.fst-board[data-layout="principal-2"] { grid-template-columns: 1.35fr 1fr; grid-template-rows: 1fr 1fr; }
.fst-board[data-layout="principal-2"] .fst-slot[data-slot="principal"] { grid-row: 1 / span 2; }
.fst-board[data-layout="principal-3"] { grid-template-columns: 1.28fr 1fr; grid-template-rows: 1fr 1fr 1fr; }
.fst-board[data-layout="principal-3"] .fst-slot[data-slot="principal"] { grid-row: 1 / span 3; }
.fst-compare-card, .fst-slot {
  position: relative;
  min-height: 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  border-radius: 12px;
  overflow: hidden;
  background: var(--fst-photo);
}
.fst-compare-photo, .fst-slot-photo, .fst-slot-empty {
  flex: 1;
  min-height: 0;
  width: 100%;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: zoom-in;
}
.fst-slot-empty {
  cursor: pointer;
  color: var(--fst-muted);
  border: 1px dashed rgba(15, 23, 42, .28);
  border-radius: 12px;
  background: transparent;
}
.fst-slot.is-target { outline: 2px dashed var(--fst-navy); }
.fst-caption {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 8px;
  padding: 6px 8px;
  border-radius: 10px;
  background: rgba(255, 255, 255, .88);
  color: #0f172a;
}
.is-bg-escuro .fst-caption { background: rgba(15, 23, 42, .72); color: #fff; }
.fst-piece {
  position: absolute;
  top: 8px;
  right: 8px;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 4px;
  max-width: calc(100% - 16px);
  opacity: 0;
}
.fst-compare-card:hover .fst-piece, .fst-slot:hover .fst-piece, .fst-compare-card:focus-within .fst-piece, .fst-slot:focus-within .fst-piece { opacity: 1; }
.fst-piece .fst-btn { min-height: 30px; padding: 0 8px; font-size: 12px; background: rgba(255, 255, 255, .94); }
.fst-thumb {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 8px;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  padding: 4px 0;
  cursor: pointer;
}
.fst-thumb img { width: 54px; height: 54px; object-fit: cover; border-radius: 8px; background: var(--fst-photo); }
.fst-empty, .fst-error { padding: 18px; color: var(--fst-muted); }
.fst-error { color: #9a3412; }
.fst-lib { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.fst-lib-photos { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; aspect-ratio: 16 / 10; background: var(--fst-photo); border-radius: 12px; overflow: hidden; }
.fst-lib-photos img, .fst-lib-ph { width: 100%; height: 100%; object-fit: cover; }
.fst-drawer, .fst-lightbox {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(10, 25, 47, .62);
  display: flex;
  justify-content: center;
  padding: 20px;
}
.fst-drawer-panel, .fst-lightbox-panel {
  background: #fff;
  color: var(--fst-ink);
  width: min(1080px, 100%);
  border-radius: 16px;
  overflow: auto;
  padding: 14px;
}
.fst-lightbox-panel { background: #10151c; color: #fff; }
.fst-lightbox-panel img { width: 100%; max-height: calc(100dvh - 150px); object-fit: contain; }
.fst-present-bar { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 12px; }
body.fst-presenting .assoc-sidebar, body.fst-presenting #catalogo-subnav, body.fst-presenting .assoc-top-nav, body.fst-presenting .fst-bar, body.fst-presenting .fst-side, body.fst-presenting .fst-popover { display: none !important; }
body.fst-presenting .fst { --fst-top: 0px; height: 100dvh; max-height: 100dvh; }
.fst-fallback-full { position: fixed; inset: 0; z-index: 60; background: var(--fst-bg); }
.fcc-header .fst-open-from-pdf { margin-top: 8px; }
@media (max-width: 1366px) {
  .fst-compare[data-layout="col-4"] { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }
}
@media (max-width: 900px) {
  .fst { height: auto; max-height: none; overflow: visible; }
  .fst-work { display: block; }
  .fst-side { border-right: 0; border-bottom: 1px solid var(--fst-line); max-height: 240px; }
  .fst-scroll { overflow: visible; }
  .fst-compare, .fst-board { display: flex !important; height: auto; overflow-x: auto; scroll-snap-type: x mandatory; }
  .fst-compare-card, .fst-slot { flex: 0 0 86%; scroll-snap-align: center; min-height: 62vh; }
  .fst-card-actions, .fst-piece { opacity: 1; }
  .fst-name { max-width: none; }
}
