/* =========================================================
   53_modal_evento.css  (SUBSTITUIR TUDO)
   MODAL EVENTO + EVENTO2 — fiel ao mock + acordeões
   ========================================================= */

:is(#modalEvento,#modalEvento2) .modal-content.modal-evento{
  max-width: 760px;
  width: min(760px, 96vw);
  max-height: none;
  overflow: visible;
}

/* TOPO */
:is(#modalEvento,#modalEvento2) .evento-top{
  display: grid;
  grid-template-columns: 140px 1fr 140px;
  align-items: start;
  column-gap: 12px;
  margin-bottom: 10px;
}
:is(#modalEvento,#modalEvento2) .evento-top .trash-menu-wrap{ justify-self: start; }
:is(#modalEvento,#modalEvento2) .evento-titlebar{ justify-self: center; }
#modalEvento .evento-top [data-close="modalEvento"]{ justify-self: end; }
#modalEvento2 .evento-top [data-close="modalEvento2"]{ justify-self: end; }

/* ✅ spacer à esquerda (para manter o título centrado, sem Lixeira) */
:is(#modalEvento,#modalEvento2) .evento-top-spacer{
  width: 140px;
}
:is(#modalEvento,#modalEvento2) .evento-titlebar{ min-width: 0; }

@media (max-width: 700px){
  :is(#modalEvento,#modalEvento2) .evento-top-spacer{
    width: 92px;
  }
}


:is(#modalEvento,#modalEvento2) .evento-titlebar{
  text-align:center;
  background:#4c654f;
  color:#fff;
  padding: 10px 16px;
  font-size: 34px;
  letter-spacing: 1px;
  width: 100%;
  max-width: 520px;
  border: 1px solid rgba(0,0,0,.25);
}

/* Texto inicial */
:is(#modalEvento,#modalEvento2) .evento-intro-full{
  text-align: center;
  margin-top: 6px;
  margin-bottom: 8px;
}
:is(#modalEvento,#modalEvento2) .evento-intro-1{
  font-size: 18px;
  line-height: 1.2;
}
:is(#modalEvento,#modalEvento2) .evento-intro-2{
  margin-top: 10px;
  font-size: 16px;
  line-height: 1.2;
}
:is(#modalEvento,#modalEvento2) .evento-sep{
  height: 1px;
  background: rgba(0,0,0,.25);
  margin: 10px 0 12px;
}

/* Base “molduras” */
:is(#modalEvento,#modalEvento2) .ev-cell{
  border: 1px solid rgba(0,0,0,.25);
  background:#efefef;
}
:is(#modalEvento,#modalEvento2) .ev-head{
  background:#cfcfcf;
  padding: 10px 10px;
  text-align:center;
  border-bottom: 1px solid rgba(0,0,0,.25);
}
:is(#modalEvento,#modalEvento2) .ev-head-green{ background:#4c654f; color:#fff; }
:is(#modalEvento,#modalEvento2) .ev-head-sand{ background:#c9c0a0; }

:is(#modalEvento,#modalEvento2) .ev-body{
  padding: 10px;
  background:#f7f7f7;
}
:is(#modalEvento,#modalEvento2) .ev-body input,
:is(#modalEvento,#modalEvento2) .ev-body select,
:is(#modalEvento,#modalEvento2) .ev-body textarea{
  width:100%;
  padding: 6px 8px;
  border: 1px solid rgba(0,0,0,.25);
  font-size: 16px;
  line-height: 1.2;
  background:#fff;
  box-sizing: border-box;
}

:is(#modalEvento,#modalEvento2) .ev-body input,
:is(#modalEvento,#modalEvento2) .ev-body select{
  height: 36px;
}

:is(#modalEvento,#modalEvento2) .ev-body-center{
  display:flex;
  align-items:center;
  justify-content:center;
}

:is(#modalEvento,#modalEvento2) input[type="checkbox"]{
  width: 26px;
  height: 26px;
}

/* UTILIZADOR full width */
:is(#modalEvento,#modalEvento2) .ev-user-full{ margin-bottom: 12px; }
:is(#modalEvento,#modalEvento2) .ev-user-full .ev-body{
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* grelhas */
:is(#modalEvento,#modalEvento2) .ev-grid{
  display:grid;
  gap: 10px;
  margin-bottom: 10px;
}

:is(#modalEvento,#modalEvento2) .ev-row-2{ grid-template-columns: 1.25fr 1.1fr; }
:is(#modalEvento,#modalEvento2) .ev-row-2b{ grid-template-columns: 1.4fr 0.6fr 0.6fr; }

:is(#modalEvento,#modalEvento2) .ev-row-3{ grid-template-columns: 1.2fr 1.2fr; }
:is(#modalEvento,#modalEvento2) .ev-row-3b{ grid-template-columns: 0.55fr 0.55fr 1.35fr; }
:is(#modalEvento,#modalEvento2) .ev-row-3c{ grid-template-columns: 0.55fr 0.55fr 1.35fr; }

:is(#modalEvento,#modalEvento2) .ev-row-4{ grid-template-columns: 1.35fr 0.6fr 0.7fr; }
:is(#modalEvento,#modalEvento2) .ev-row-4b{ grid-template-columns: 0.7fr 0.7fr 0.7fr 0.7fr; }

:is(#modalEvento,#modalEvento2) .ev-row-5{ grid-template-columns: 1.05fr 1.05fr; }
:is(#modalEvento,#modalEvento2) .ev-row-6{ grid-template-columns: 1fr; }

:is(#modalEvento,#modalEvento2) #evento_nota,
:is(#modalEvento,#modalEvento2) #e2_evento_nota{
  height: 56px;
  resize: none;
}

/* =========================
   ACORDEÃO
   ========================= */
:is(#modalEvento,#modalEvento2) .ev-acc{ margin: 12px 0; }


:is(#modalEvento,#modalEvento2) .ev-acc-bar{
  width: 100%;
  border: 1px solid #b7b7b7;
  background: #afbab8;

  /* ✅ EXPERIMENTAR AQUI */
  font-size: 20px;        /* ex.: 18 / 20 / 22 */
  color: #032615;        /* #032615 cinzento esverdeado ex.: / #222 / #333 */
  font-weight: 100;

  text-align: center;
  padding: 10px 12px;
  cursor: pointer;
  position: relative;

  min-height: 44px;
  display:flex;
  align-items:center;
  justify-content:center;
}

:is(#modalEvento,#modalEvento2) .ev-acc-caret{
  position: absolute;
  right: 14px;
  top: 50%;
  width: 0; height: 0;
  transform: translateY(-50%);
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 8px solid #2b2b2b;
}
:is(#modalEvento,#modalEvento2) .ev-acc-panel{
  border: 1px solid #b7b7b7;
  border-top: none;
  padding: 10px;
  background: #f7f7f7;
}
:is(#modalEvento,#modalEvento2) .ev-acc.is-collapsed .ev-acc-panel{ display:none; }
:is(#modalEvento,#modalEvento2) .ev-acc.is-collapsed .ev-acc-caret{ transform: translateY(-50%) rotate(-90deg); }

:is(#modalEvento,#modalEvento2) .ev-acc-text{
  font-size: 13px;
  line-height: 1.35;
  color: #222;
}

/* =========================================================
   APAGAR EVENTO — layout padrão (igual à filosofia do Processo)
   ========================================================= */

#modalEvento .ev-del-text{
  font-size: 12px;
  line-height: 1.25;
  margin-bottom: 10px;
}
#modalEvento .ev-del-text p{ margin: 6px 0; }

#modalEvento .ev-del-box{
  border: 1px solid rgba(0,0,0,.25);
  background: #f3f3f3;
  padding: 10px;
  margin-bottom: 10px;
}

/* ✅ SOLO: botão à direita */
#modalEvento .ev-del-solo-grid-right{
  display:grid;
  grid-template-columns: 1fr 140px;
  gap: 10px;
  align-items: center;
}

#modalEvento .ev-del-solo-hint{
  font-size: 13px;
}

/* Linha de cima do partilhado: texto + checkbox à direita */
#modalEvento .ev-del-row-top{
  display: grid;
  grid-template-columns: 1fr 28px;
  gap: 10px;
  align-items: center;
}
#modalEvento .ev-del-row-top-left{
  font-size: 13px;
}
#modalEvento .ev-del-row-top-right{
  display:flex;
  align-items:center;
  justify-content:center;
}

/* texto pequeno por baixo */
#modalEvento .ev-del-hint{
  margin-top: 8px;
  font-size: 12px;
  opacity: .85;
}

/* Linha de baixo: lista + concordo */
#modalEvento .ev-del-row-bottom{
  display:grid;
  grid-template-columns: 1fr 140px;
  gap: 10px;
  align-items: start;
  margin-top: 10px;
}

#modalEvento .ev-del-smalltitle{
  font-size: 12px;
  opacity: .85;
  margin-bottom: 6px;
}

#modalEvento .ev-shared-list{
  border: 1px solid rgba(0,0,0,.35);
  background: #fff;
  padding: 8px 10px;
  min-height: 36px;
  max-height: 90px;
  overflow: auto;
  box-sizing: border-box;
}

/* Concordo (coluna direita) */
#modalEvento .ev-del-bottom-right{
  text-align:center;
}
#modalEvento .ev-del-checkwrap{
  display:flex;
  align-items:center;
  justify-content:center;
  min-height: 44px;
}

/* Quadrados um pouco maiores */
#modalEvento #evDeleteProposta,
#modalEvento #evDeleteConcordo{
  width: 22px;
  height: 22px;
  transform: scale(1.35);
  transform-origin: center;
  accent-color: #111;
  cursor: pointer;
}

/* status (se for mostrado pelo JS) */
#modalEvento .ev-del-status{
  margin-top: 8px;
  font-size: 12px;
  opacity: .85;
}

/* BOTÕES finais */
:is(#modalEvento,#modalEvento2) .ev-actions-bottom{
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 22px;

  width: 100%;
  margin: 14px auto 0;
}

:is(#modalEvento,#modalEvento2) .evento-btn{
  border-radius: 20px;
  border: 2px solid rgba(0,0,0,.25);
  cursor: pointer;

  width: 220px;
  max-width: 45vw;

  min-height: 44px;
  font-size: 18px;
  font-weight: 200;
  line-height: 1.05;
  white-space: normal;
}

:is(#modalEvento,#modalEvento2) .evento-btn-blue{ background:#3f4f8c; color:#fff; }
:is(#modalEvento,#modalEvento2) .evento-btn-green{ background:#4c654f; color:#fff; }

/* Botão "areia" do apagar no EVENTO2 */
#modalEvento2 .evento-btn-sand{
  background:#c9c0a0;
  color:#000;
}

/* ✅ Base de 3 botões (EVENTO2) */
#modalEvento2 .ev-actions-bottom-3{
  justify-content: space-between;
  gap: 18px;
}
#modalEvento2 .ev-actions-bottom-3 .ev-actions-right{
  display:flex;
  gap: 18px;
  justify-content: flex-end;
  align-items:center;
}

/* Scroll */
:is(#modalEvento,#modalEvento2) .modal-content.modal-evento{
  max-height: 92vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

#modalEvento #evAccNotificacao.is-dimmed .ev-acc-panel{
  opacity: .45;
  pointer-events: none;
}
#modalEvento2 #e2_evAccNotificacao.is-dimmed .ev-acc-panel{
  opacity: .45;
  pointer-events: none;
}

/* MOBILE */
@media (max-width: 700px){

  :is(#modalEvento,#modalEvento2) .modal-content.modal-evento{
    padding: 12px;
    width: calc(100% - 24px);
  }

  :is(#modalEvento,#modalEvento2) .evento-top{
    grid-template-columns: 92px 1fr 92px;
    column-gap: 8px;
    margin-bottom: 8px;
  }
  :is(#modalEvento,#modalEvento2) .evento-top .btn-pill{
    min-width: 92px;
    padding: 8px 10px;
    font-size: 14px;
  }
  :is(#modalEvento,#modalEvento2) .evento-titlebar{
    max-width: 100%;
    font-size: 24px;
    padding: 10px 8px;
    line-height: 1.05;
    white-space: normal;
    overflow-wrap: anywhere;
  }


  :is(#modalEvento,#modalEvento2) .ev-grid.ev-row-2,
  :is(#modalEvento,#modalEvento2) .ev-grid.ev-row-2b{
    grid-template-columns: 1fr;
  }

  :is(#modalEvento,#modalEvento2) .ev-acc-panel{
    padding: 10px;
  }

  :is(#modalEvento,#modalEvento2) .ev-acc-panel .ev-grid.ev-row-3,
  :is(#modalEvento,#modalEvento2) .ev-acc-panel .ev-grid.ev-row-3b,
  :is(#modalEvento,#modalEvento2) .ev-acc-panel .ev-grid.ev-row-3c,
  :is(#modalEvento,#modalEvento2) .ev-acc-panel .ev-grid.ev-row-4,
  :is(#modalEvento,#modalEvento2) .ev-acc-panel .ev-grid.ev-row-4b,
  :is(#modalEvento,#modalEvento2) .ev-acc-panel .ev-grid.ev-row-5,
  :is(#modalEvento,#modalEvento2) .ev-acc-panel .ev-grid.ev-row-6{
    grid-template-columns: 1fr;
  }

  :is(#modalEvento,#modalEvento2) .ev-actions-bottom{
    gap: 14px;
  }
  :is(#modalEvento,#modalEvento2) .evento-btn{
    width: 44vw;
    max-width: 44vw;
    min-height: 58px;
    font-size: 16px;
  }

  :is(#modalEvento,#modalEvento2) input[type="checkbox"]{
    width: 28px;
    height: 28px;
  }

  #modalEvento2 .ev-actions-bottom-3 .ev-actions-right{
    gap: 14px;
  }

  /* Mobile: no apagar, empilhar */
  #modalEvento .ev-del-row-bottom{
    grid-template-columns: 1fr;
  }

  /* Mobile: SOLO também empilha (para não ficar apertado) */
  #modalEvento .ev-del-solo-grid-right{
    grid-template-columns: 1fr;
  }
}

/* =========================================================
   AVISO NA BARRA (canto esquerdo) — "Tem pedido de apagar"
   ========================================================= */

/* AVISO NA BARRA — funciona se a classe estiver na BARRA ou no ACORDEÃO */
/* =========================================================
   AVISO NA BARRA — "Tem pedido de apagar" (Evento)
   (SEM empurrar o título)
   ========================================================= */

/* se a classe estiver na BARRA */
#modalEvento .ev-acc-bar.has-delete-request::before,
#modalEvento2 .ev-acc-bar.has-delete-request::before{
  content: "Tem pedido de apagar";
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);

  font-size: 12px;
  color: #032615;
  font-weight: 500;
  white-space: nowrap;
  opacity: .95;

  pointer-events: none;
}

/* se a classe estiver no ACORDEÃO */
#modalEvento #evAccApagar.has-delete-request .ev-acc-bar::before,
#modalEvento2 #evAccApagar.has-delete-request .ev-acc-bar::before{
  content: "Tem pedido de apagar";
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);

  font-size: 12px;
  color: #032615;
  font-weight: 500;
  white-space: nowrap;
  opacity: .95;

  pointer-events: none;
}

/* NÃO reservar padding extra */
#modalEvento .ev-acc-bar.has-delete-request,
#modalEvento2 .ev-acc-bar.has-delete-request,
#modalEvento #evAccApagar.has-delete-request .ev-acc-bar,
#modalEvento2 #evAccApagar.has-delete-request .ev-acc-bar{
  padding-left: 12px;
}

/* =========================================================
   SNAPSHOTS (Evento) — bloco final
   ========================================================= */

#modalEvento .ev-row-snap{
  grid-template-columns: 1fr 1fr;
}

#modalEvento.is-snapshot-preview .ev-acc-panel{
  box-shadow: inset 0 0 0 9999px rgba(255,247,214,.18);
}

@media (max-width: 700px){
  #modalEvento .ev-row-snap{
    grid-template-columns: 1fr;
  }
}

/* NOVO: linha simples do tipo (topo) */
#modalEvento .ev-row-tipo-only{
  grid-template-columns: 1fr;
  margin-bottom: 10px;
}

/* NOVO: auditoria (criador) dentro do acordeão Informação */
#modalEvento .ev-row-info-audit{
  grid-template-columns: 1fr 1fr;
}

/* Mobile */
@media (max-width: 700px){
  #modalEvento .ev-row-info-audit{
    grid-template-columns: 1fr;
  }
}

/* NOVO: topo 2x2 (Nome/Utilizador + Processo/Tipo) */
#modalEvento .ev-row-top4{
  grid-template-columns: 1.25fr 1.1fr;
}

/* Mobile: empilhar */
@media (max-width: 700px){
  #modalEvento .ev-row-top4{
    grid-template-columns: 1fr;
  }
}
/* =========================
   SNAPSHOT PREVIEW (EVENTO)
   ========================= */

/* Bloquear interação em todos os campos quando o modal está em preview */
#modalEvento.is-snapshot-preview input,
#modalEvento.is-snapshot-preview select,
#modalEvento.is-snapshot-preview textarea,
#modalEvento.is-snapshot-preview button {
  pointer-events: none !important;
}

/* Mas permitir usar os 2 selects de snapshots para mudar de snapshot */
#modalEvento.is-snapshot-preview #ev_snapshot_user,
#modalEvento.is-snapshot-preview #ev_snapshot_ts {
  pointer-events: auto !important;
}

/* (Opcional) dar feedback visual */
#modalEvento.is-snapshot-preview .ev-acc-panel,
#modalEvento.is-snapshot-preview .ev-grid {
  opacity: 0.92;
}
#modalEvento.is-snapshot-preview .modal-content * {
  pointer-events: none !important;
}

#modalEvento.is-snapshot-preview #ev_snapshot_user,
#modalEvento.is-snapshot-preview #ev_snapshot_ts {
  pointer-events: auto !important;
}
/* TESTE FORTE: se isto não der "none", o CSS não está a ser aplicado */
#modalEvento.is-snapshot-preview #evento_nome{
  pointer-events: none !important;
}
/* SNAPSHOT PREVIEW (EVENTO + EVENTO2) */
:is(#modalEvento,#modalEvento2).is-snapshot-preview .modal-content *{
  pointer-events: none !important;
}

/* permitir mudar de snapshot */
:is(#modalEvento,#modalEvento2).is-snapshot-preview #ev_snapshot_user,
:is(#modalEvento,#modalEvento2).is-snapshot-preview #ev_snapshot_ts{
  pointer-events: auto !important;
}

/* ✅ permitir clicar na barra "Logística do Evento" para sair do preview */
:is(#modalEvento,#modalEvento2).is-snapshot-preview .ev-acc-bar[data-acc="evAccInfo"]{
  pointer-events: auto !important;
}


/* Só a barra "Logística do Evento" */
#evAccInfo > .ev-acc-bar{
  background: #cfcfcf !important;
  border-color: rgba(0,0,0,.18) !important;
  color: #54705b !important;
}
#evAccInfo > .ev-acc-bar:hover{
  background: ededed !important;
}
/* Botões dentro do modal Evento: menos arredondados */
#modalEvento .btn-pill,
#modalEvento .ev-actionbtn,
#modalEvento button{
  border-radius: 12px !important;
}

