/* =========================================================
   Entre Tempos — sistema dinâmico de participantes autorais
   Controles administrativos + cards criados pelo Firebase.
   ========================================================= */

.et-admin-barra {
  position: relative;
  z-index: 20;
  width: min(100% - 32px, 900px);
  margin: 8px auto 26px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.et-admin-adicionar {
  display: none;
  align-items: center;
  gap: 9px;
  padding: 10px 17px;
  border: 1px dashed #8c3b3b;
  border-radius: 3px;
  background: rgba(255, 253, 247, .86);
  color: #8c3b3b;
  box-shadow: 2px 4px 12px rgba(62, 50, 40, .12);
  font-family: 'Special Elite', serif;
  font-size: 13px;
  letter-spacing: .06em;
  cursor: pointer;
  transition: transform .18s ease, background .18s ease, box-shadow .18s ease;
}

.et-admin-barra.is-pesquisador .et-admin-adicionar {
  display: inline-flex;
}

.et-admin-adicionar:hover {
  transform: translateY(-2px) rotate(-.5deg);
  background: #fffdf7;
  box-shadow: 3px 7px 18px rgba(62, 50, 40, .16);
}

.et-admin-adicionar__mais {
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-family: Arial, sans-serif;
  font-size: 20px;
  line-height: 1;
}

.et-admin-organizar > span:first-child {
  font-family: Arial, sans-serif;
  font-size: 20px;
  line-height: 1;
}

.et-participantes-dinamicos {
  position: relative;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
  gap: 40px;
  width: min(100% - 32px, 900px);
  margin: 0 auto 55px;
}

.et-pessoa-card {
  display: block;
  width: clamp(210px, 28vw, 300px);
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.et-pessoa-card__foto {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: #e8dcc0;
  box-shadow: 4px 7px 17px rgba(0, 0, 0, .2);
  transform: rotate(-1.2deg);
  transition: transform .3s ease, box-shadow .3s ease;
}

.et-pessoa-card:nth-child(even) .et-pessoa-card__foto {
  transform: rotate(1.1deg);
}

.et-pessoa-card:hover .et-pessoa-card__foto {
  transform: translateY(-4px) rotate(0deg) scale(1.015);
  box-shadow: 6px 11px 24px rgba(0, 0, 0, .24);
}

.et-pessoa-card__foto img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.et-pessoa-card__nome {
  display: block;
  margin-top: 13px;
  color: #3e3228;
  font-family: 'Special Elite', serif;
  font-size: 14px;
  line-height: 1.4;
  text-align: center;
  letter-spacing: .045em;
}

.et-pessoa-card__descricao {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  max-width: 260px;
  margin: 6px auto 0;
  color: #7a6a50;
  font-family: 'IM Fell English', serif;
  font-size: 13px;
  line-height: 1.45;
  text-align: center;
}

.et-ordem-lista--blocos {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  width: 100%;
  max-width: none;
  margin: 0;
}

.et-ordem-lista--blocos > .et-pessoa-card {
  margin: 34px auto 55px;
}

.et-ordem-lista--blocos > [data-et-order-id] + [data-et-order-id]::before {
  content: '';
  display: block;
  width: 80%;
  height: 2px;
  margin: 10px auto 30px;
  background: linear-gradient(to right, transparent, #c0392b, #c4a96b, #c0392b, transparent);
}

.et-perfil__instagram {
  display: inline-block;
  margin-top: 9px;
  color: #8c3b3b;
  border-bottom: 1px dashed currentColor;
  font-family: 'Special Elite', serif;
  font-size: 13px;
  letter-spacing: .03em;
  text-decoration: none;
}

.et-perfil__instagram[hidden] {
  display: none !important;
}

.et-perfil__instagram:hover,
.et-perfil__instagram:focus-visible {
  color: #5f2525;
}

.et-estado-vazio {
  width: 100%;
  padding: 12px;
  color: #7a6a50;
  font-family: 'Special Elite', serif;
  font-size: 12px;
  text-align: center;
}

/* Modal / ficha */
.et-modal[hidden] {
  display: none !important;
}

.et-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(32, 25, 21, .68);
  backdrop-filter: blur(3px);
}

.et-modal__caixa {
  position: relative;
  width: min(100%, 620px);
  max-height: min(88vh, 820px);
  overflow: auto;
  padding: clamp(25px, 5vw, 42px);
  border: 1px dashed #c4a96b;
  border-left: 6px solid #8c3b3b;
  background: #fffdf7;
  color: #3e3228;
  box-shadow: 10px 18px 50px rgba(0, 0, 0, .36);
  transform: rotate(-.3deg);
}

.et-modal__fechar {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #8c3b3b;
  font-size: 27px;
  line-height: 1;
  cursor: pointer;
}

.et-modal__kicker {
  margin-bottom: 7px;
  color: #8c3b3b;
  font-family: 'Special Elite', serif;
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.et-modal__titulo {
  margin: 0 44px 26px 0;
  color: #1a1a1a;
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(36px, 7vw, 54px);
  font-weight: normal;
  letter-spacing: .045em;
  line-height: .95;
  text-shadow: 2px 2px 0 #c4a96b;
}

.et-campo {
  display: grid;
  gap: 7px;
  margin-bottom: 20px;
}

.et-campo label,
.et-label {
  color: #8c3b3b;
  font-family: 'Special Elite', serif;
  font-size: 12px;
  letter-spacing: .04em;
}

.et-campo input,
.et-campo textarea,
.et-campo select {
  width: 100%;
  border: 0;
  border-bottom: 2px solid #c4a96b;
  border-radius: 0;
  padding: 11px 12px;
  background: rgba(242, 232, 213, .46);
  color: #3e3228;
  font-family: 'IM Fell English', serif;
  font-size: 17px;
  outline: none;
}

.et-campo textarea {
  min-height: 128px;
  resize: vertical;
  border: 1px solid #d8c79f;
  border-left: 3px solid #c4a96b;
}

.et-campo input:focus,
.et-campo textarea:focus,
.et-campo select:focus {
  border-color: #8c3b3b;
  background: #fffdf7;
}

.et-arquivo {
  padding: 14px;
  border: 1px dashed #c4a96b;
  background: rgba(242, 232, 213, .32);
}

.et-arquivo input[type='file'] {
  border: 0;
  padding: 0;
  background: transparent;
  font-family: 'Special Elite', serif;
  font-size: 12px;
}

.et-preview {
  display: none;
  width: min(100%, 240px);
  max-height: 260px;
  object-fit: cover;
  margin-top: 12px;
  box-shadow: 3px 6px 14px rgba(0, 0, 0, .2);
}

.et-preview.is-visible {
  display: block;
}

.et-modal__acoes {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 26px;
}

.et-btn {
  min-height: 42px;
  padding: 10px 18px;
  border-radius: 2px;
  font-family: 'Special Elite', serif;
  font-size: 12px;
  cursor: pointer;
}

.et-btn--principal {
  border: 2px dashed rgba(255, 253, 247, .65);
  background: #8c3b3b;
  color: #fffdf7;
  box-shadow: 0 5px 14px rgba(140, 59, 59, .25);
}

.et-btn--secundario {
  border: 1px solid #8c3b3b;
  background: transparent;
  color: #8c3b3b;
}

.et-btn--perigo {
  border: 1px dashed #922b21;
  background: transparent;
  color: #922b21;
}

.et-btn:disabled {
  cursor: wait;
  opacity: .55;
}

.et-progresso {
  min-height: 20px;
  margin-top: 14px;
  color: #7a6a50;
  font-family: 'Special Elite', serif;
  font-size: 12px;
  line-height: 1.5;
}

.et-progresso.is-erro {
  color: #922b21;
}

.et-progress-bar {
  display: none;
  height: 5px;
  margin-top: 9px;
  overflow: hidden;
  background: #e8dcc0;
}

.et-progress-bar.is-visible {
  display: block;
}

.et-progress-bar > span {
  display: block;
  width: 0%;
  height: 100%;
  background: #8c3b3b;
  transition: width .2s ease;
}

body.et-modal-aberto {
  overflow: hidden !important;
}

@media (max-width: 600px) {
  .et-admin-barra {
    flex-direction: column;
    justify-content: center;
    margin-bottom: 20px;
  }

  .et-admin-adicionar {
    width: min(100%, 280px);
    justify-content: center;
  }

  .et-participantes-dinamicos {
    flex-direction: column;
    align-items: center;
    gap: 26px;
  }

  .et-pessoa-card {
    width: min(74vw, 250px);
  }

  .et-modal {
    padding: 10px;
  }

  .et-modal__caixa {
    max-height: 94vh;
    padding: 28px 19px 24px;
    transform: none;
  }

  .et-modal__acoes {
    flex-direction: column-reverse;
  }

  .et-modal__acoes .et-btn {
    width: 100%;
  }

  .et-ordem-item {
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 7px;
    padding-left: 9px;
  }

  .et-ordem-item__alca {
    display: none;
  }
}


/* =========================================================
   Editor dos poetas já existentes
   Mesmo padrão visual do gerenciador dos poetas dinâmicos.
   ========================================================= */
.et-poeta-admin {
  position: relative;
  z-index: 20;
  width: min(calc(100% - 40px), 900px);
  margin: 0 auto 30px;
  padding: 17px 18px;
  border: 1px dashed #c4a96b;
  border-left: 5px solid #8c3b3b;
  background: rgba(255, 253, 247, .82);
  box-shadow: 3px 6px 14px rgba(0, 0, 0, .09);
}

.et-poeta-admin[hidden] {
  display: none !important;
}

.et-poeta-admin__rotulo {
  display: block;
  margin-bottom: 12px;
  color: #8c3b3b;
  font-family: 'Special Elite', serif;
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.et-poeta-admin__acoes {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.et-poeta-admin__acoes .et-btn {
  flex: 1 1 220px;
}

.et-poeta-admin__acoes .et-btn--perigo {
  flex-basis: 100%;
}

.et-legado-card-acoes,
.et-legado-acoes {
  position: relative;
  z-index: 40;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  margin: 10px 0;
}

.foto-nav > .et-legado-card-acoes {
  position: absolute;
  right: 6px;
  bottom: 6px;
  left: 6px;
  justify-content: center;
  padding: 7px;
  background: rgba(255, 253, 247, .94);
  box-shadow: 2px 4px 12px rgba(0, 0, 0, .16);
}

[data-et-person-id],
[data-et-content-id] {
  position: relative;
}

.et-legado-publicacao {
  width: min(calc(100% - 32px), 820px);
  margin: 26px auto;
  padding: 22px;
  border: 1px dashed #c4a96b;
  background: rgba(255, 253, 247, .88);
  color: #3e3228;
}

.et-legado-publicacao__titulo {
  margin-bottom: 12px;
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(26px, 5vw, 40px);
  font-weight: normal;
}

.et-legado-publicacao__descricao {
  margin-bottom: 16px;
  font-family: 'IM Fell English', serif;
  white-space: pre-wrap;
}

.et-legado-publicacao img,
.et-legado-publicacao video,
.et-legado-publicacao audio {
  display: block;
  width: min(100%, 720px);
  max-height: 75vh;
  margin: 0 auto;
  object-fit: contain;
}

.et-poeta-poema__acoes {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
  margin: -4px 0 15px;
}

.et-modal__caixa--poeta {
  width: min(100%, 760px);
}

.et-modal__caixa--ordem {
  width: min(100%, 680px);
}

.et-ordem-ajuda {
  margin: -10px 0 18px;
  color: #7a6a50;
  font-family: 'IM Fell English', serif;
  font-size: 15px;
}

.et-ordem-lista-admin {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: et-ordem;
}

.et-ordem-item {
  counter-increment: et-ordem;
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  min-height: 54px;
  padding: 8px 9px 8px 13px;
  border: 1px dashed #c4a96b;
  border-left: 4px solid #8c3b3b;
  background: rgba(242, 232, 213, .42);
  cursor: grab;
}

.et-ordem-item::before {
  content: counter(et-ordem) '.';
  color: #8c3b3b;
  font-family: 'Special Elite', serif;
  font-size: 12px;
}

.et-ordem-item.is-arrastando {
  opacity: .48;
}

.et-ordem-item__alca {
  color: #9f8a63;
  font-family: Arial, sans-serif;
  letter-spacing: -3px;
}

.et-ordem-item__nome {
  overflow: hidden;
  color: #3e3228;
  font-family: 'Special Elite', serif;
  font-size: 13px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.et-ordem-item__acoes {
  display: flex;
  gap: 5px;
}

.et-ordem-item__acoes button {
  width: 36px;
  height: 36px;
  border: 1px solid #8c3b3b;
  border-radius: 2px;
  background: #fffdf7;
  color: #8c3b3b;
  font-size: 19px;
  cursor: pointer;
}

.et-ordem-item__acoes button:disabled {
  opacity: .3;
  cursor: default;
}

.et-poeta-poemas-editor {
  display: grid;
  gap: 18px;
  margin-top: 30px;
}

.et-poeta-poemas-editor > h3 {
  margin: 0;
  color: #1a1a1a;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 30px;
  font-weight: normal;
  letter-spacing: .06em;
}

.et-poeta-poema {
  min-width: 0;
  margin: 0;
  padding: 18px 16px 4px;
  border: 1px dashed #c4a96b;
  background: rgba(242, 232, 213, .28);
}

.et-poeta-poema legend {
  padding: 0 8px;
  color: #8c3b3b;
  font-family: 'Special Elite', serif;
  font-size: 12px;
  letter-spacing: .06em;
}

@media (max-width: 600px) {
  .et-poeta-admin {
    width: calc(100% - 40px);
    margin-bottom: 30px;
    padding: 17px 18px;
  }

  .et-poeta-admin__acoes {
    flex-direction: column;
  }

  .et-poeta-admin__acoes .et-btn {
    width: 100%;
    flex: 0 0 auto;
  }

  .et-modal__caixa--poeta {
    width: 100%;
  }

  .et-poeta-poema {
    padding: 15px 12px 2px;
  }
}
