/* Seção Pódios (sections/podios.js). Prefixo pd-. A prévia do Discord usa os estilos dp-* de mensagens.css. */

.pd {
  display: grid;
  gap: 16px;
}
.pd-body {
  display: grid;
  gap: 16px;
}

/* ---------- passos ---------- */

.pd-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}
.pd-step {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 6px 12px;
  border: 1px solid var(--ui-border);
  border-radius: var(--control-radius);
  background: var(--ui-control-bg);
  color: var(--ui-muted);
  font: 600 12.5px var(--font-sans);
  text-align: left;
  cursor: pointer;
}
.pd-step:hover {
  color: var(--ui-text);
  border-color: rgba(255, 255, 255, 0.2);
}
.pd-step.active {
  color: var(--ui-text);
  border-color: rgb(var(--accent-rgb) / 0.55);
  background: rgb(var(--accent-rgb) / 0.08);
}
.pd-step-n {
  display: inline-grid;
  place-items: center;
  flex: 0 0 24px;
  height: 24px;
  border-radius: 4px;
  border: 1px solid var(--ui-border);
  font: 600 10px var(--font-mono);
  color: var(--muted-2);
}
.pd-step.ok .pd-step-n {
  color: var(--in);
  border-color: rgb(79 209 149 / 0.4);
}
.pd-step.active .pd-step-n {
  color: var(--accent-hot);
  border-color: rgb(var(--accent-rgb) / 0.55);
}
.pd-step-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
@media (max-width: 639px) {
  .pd-steps {
    gap: 4px;
  }
  .pd-step {
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    padding: 6px 4px;
    font-size: 10.5px;
    text-align: center;
  }
  .pd-step-label {
    max-width: 100%;
  }
}

/* ---------- avisos ---------- */

.pd-plain {
  margin: 4px 0 0;
  padding-left: 16px;
}
.pd-problems ul {
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
}
.pd-problems li {
  margin: 0;
}
/* Cada ponto é um botão com área de toque de 44 px. */
.pd-problem {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 44px;
}
.pd-checklist {
  color: var(--ui-muted);
}
.pd-link {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, 0.25);
  text-underline-offset: 3px;
  cursor: pointer;
}
.pd-link:hover {
  color: var(--ui-text);
  text-decoration-color: currentColor;
}
.pd-ready .ico {
  color: var(--in);
}
.pd-sub {
  margin: 0;
  font: 600 10px var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-2);
}

/* ---------- passo 1 ---------- */

.pd-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.pd-dest {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
}
.pd-dest-tag {
  padding: 1px 6px;
  border-radius: 4px;
  background: rgb(var(--accent-rgb) / 0.14);
  color: var(--accent-hot);
  font: 600 9px var(--font-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.pd-advanced {
  margin-top: 8px;
  border-top: 1px solid var(--rule-soft);
  padding-top: 12px;
}
.pd-advanced summary {
  cursor: pointer;
  color: var(--ui-muted);
  font-size: 13px;
  min-height: 32px;
}
.pd-advanced[open] summary {
  margin-bottom: 8px;
}

/* ---------- passo 2 ---------- */

.pd-file {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.pd-drop {
  display: grid;
  justify-items: center;
  gap: 4px;
  padding: 22px 16px;
  border: 1px dashed rgba(255, 255, 255, 0.22);
  border-radius: var(--ui-radius);
  background: var(--ui-control-bg);
  text-align: center;
  cursor: pointer;
}
.pd-drop .ico {
  color: var(--accent);
}
.pd-drop:hover,
.pd-drop.over,
.pd-file:focus-visible + .pd-drop {
  border-color: rgb(var(--accent-rgb) / 0.6);
  background: rgb(var(--accent-rgb) / 0.05);
}
.pd-thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
  margin-top: 14px;
}
.pd-thumb {
  position: relative;
  margin: 0;
  border: 1px solid var(--ui-border);
  border-radius: var(--ui-radius);
  overflow: hidden;
  background: var(--ui-raised);
}
.pd-thumb.unused {
  border-color: rgb(242 184 75 / 0.45);
}
.pd-thumb img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: #08080b;
}
.pd-thumb figcaption {
  display: grid;
  gap: 6px;
  padding: 8px;
  font-size: 12px;
}
.pd-thumb-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pd-thumb .tag {
  justify-self: start;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pd-thumb-x {
  position: absolute;
  top: 6px;
  right: 6px;
  background: rgba(11, 11, 14, 0.82);
}
.pd-match {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}
.pd-match-row {
  display: grid;
  grid-template-columns: minmax(120px, 0.8fr) minmax(0, 1.2fr);
  align-items: center;
  gap: 10px;
}
.pd-match-cat {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  font-size: 13.5px;
}

/* ---------- passo 3 ---------- */

.pd-paste {
  font-family: var(--font-mono);
  font-size: 13px;
  min-height: 180px;
}
@media (max-width: 1023px) {
  .pd-paste {
    font-size: 16px;
  }
}
.pd-read {
  align-items: center;
  flex-wrap: wrap;
}
.pd-read .muted {
  margin-right: auto;
}
.pd-cats {
  display: grid;
  gap: 12px;
}
.pd-cats-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.pd-addcat {
  width: 200px;
}
.pd-cat {
  display: grid;
  gap: 12px;
}
.pd-cat-head {
  display: flex;
  align-items: center;
  gap: 10px;
}
.pd-cat-photo {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  border-radius: 6px;
  object-fit: cover;
  border: 1px solid var(--ui-border);
}
.pd-cat-photo.empty {
  display: grid;
  place-items: center;
  color: var(--warn);
  border-style: dashed;
}
.pd-cat-name {
  flex: 1 1 auto;
  min-width: 0;
  font-weight: 650;
}
.pd-key {
  color: var(--muted-2);
  font-size: 10.5px;
}
@media (max-width: 639px) {
  .pd-key {
    display: none;
  }
}
.pd-result {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--rule-soft);
  border-radius: var(--ui-radius);
  background: var(--ui-control-bg);
}
.pd-result-head {
  display: flex;
  align-items: center;
  gap: 10px;
}
.pd-pos {
  color: var(--accent);
  font-size: 12px;
}
.pd-animal {
  flex: 1 1 auto;
  min-width: 0;
}
.pd-result-grid {
  display: grid;
  gap: 0 12px;
}
@media (min-width: 768px) {
  .pd-result-grid {
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) auto;
  }
}
.pd-presenter {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px;
  gap: 6px;
}
.pd-presenter input.bad {
  border-color: var(--out);
}
.pd-result .field {
  margin-bottom: 0;
}
.pd-result textarea {
  min-height: 60px;
}

/* ---------- passo 4 ---------- */

.pd-split {
  display: grid;
  gap: 16px;
}
.pd-split-main {
  display: grid;
  gap: 16px;
  align-content: start;
  min-width: 0;
}
.pd-split-side {
  min-width: 0;
}
@media (min-width: 1100px) {
  .pd-split {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
    align-items: start;
  }
  .pd-split-side {
    position: sticky;
    top: calc(var(--topbar-h) + 12px);
    max-height: calc(100vh - var(--topbar-h) - 24px);
    overflow: auto;
    scrollbar-width: thin;
  }
}
.pd-text-label {
  display: flex;
  align-items: center;
  gap: 8px;
}
.pd-text-label .tag {
  letter-spacing: 0.04em;
}
.pd-preview {
  display: grid;
  gap: 14px;
}
.pd-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.pd-preview-head .seg {
  max-width: 100%;
  overflow-x: auto;
}
.pd-msg {
  display: grid;
  gap: 6px;
}
.pd-msg-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font: 600 10px var(--font-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted-2);
}
.pd-msg-label span:nth-child(2) {
  flex: 1 1 auto;
  color: var(--ui-muted);
}
.pd-publish-line {
  margin: 0 0 4px;
  font-weight: 600;
}
.pd-publish-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 14px;
}
.pd-publish-actions .muted {
  margin-right: auto;
}
@media (max-width: 639px) {
  .pd-publish-actions .btn {
    flex: 1 1 100%;
  }
}

/* ---------- navegação e histórico ---------- */

.pd-nav {
  justify-content: space-between;
}
.pd-nav .btn.primary:only-child {
  margin-left: auto;
}
.pd-history {
  list-style: none;
  margin: 0;
  padding: 0;
}
.pd-history li {
  display: grid;
  gap: 8px;
  padding: 12px 0;
  border-top: 1px solid var(--rule-soft);
}
.pd-history li:first-child {
  border-top: 0;
  padding-top: 0;
}
.pd-history-main {
  display: grid;
  gap: 2px;
}
.pd-history-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.pd-history-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
}
@media (min-width: 768px) {
  .pd-history li {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }
  .pd-history-links {
    justify-content: flex-end;
  }
}
