/* ==========================================================================
   DFPet — mobile, parte 2 (direção 1a)
   Objetivos, sheet de ações do cliente, estados de erro e vazio.
   Importar DEPOIS de style-mobile.css.
   ========================================================================== */

@media (max-width: 900px) {

  /* Objetivos (rosca/<details>) fica pra Fase 2 — ver plano. */

  /* --- 11. sheet de ações do cliente ------------------------------------- */

  .acoes-sheet-backdrop {
    position: fixed; inset: 0; z-index: 200;
    background: rgba(10, 17, 48, 0.5);
    display: flex; align-items: flex-end;
    opacity: 0; pointer-events: none;
    transition: opacity 0.16s ease;
  }
  .acoes-sheet-backdrop[data-aberto] { opacity: 1; pointer-events: auto; }

  .acoes-sheet {
    width: 100%;
    background: var(--bg, #F7F3EA);
    border-radius: 20px 20px 0 0;
    padding: 16px 16px calc(20px + env(safe-area-inset-bottom, 0px));
    display: flex; flex-direction: column; gap: 6px;
    transform: translateY(14px);
    transition: transform 0.16s ease;
    max-height: 82vh; overflow-y: auto;
  }
  .acoes-sheet-backdrop[data-aberto] .acoes-sheet { transform: translateY(0); }

  .acoes-sheet-titulo {
    font-size: 1.05rem; font-weight: 700; color: var(--ink);
    padding: 0 2px 8px; line-height: 1.3;
  }
  .acoes-sheet-item {
    min-height: 56px; width: 100%;
    background: var(--surface, #FFFDF8);
    border: 1.5px solid rgba(10, 17, 48, 0.14);
    border-radius: var(--radius-sm, 12px);
    box-shadow: none;
    padding: 14px; margin: 0;
    display: flex; align-items: center; gap: 10px;
    font-family: inherit; font-size: 1rem; font-weight: 600;
    color: var(--ink); text-align: left; text-decoration: none;
  }
  .acoes-sheet-item:hover { background: var(--surface, #FFFDF8); }
  .acoes-sheet-item .nota {
    margin-left: auto; font-family: var(--font-mono, monospace);
    font-size: 0.74rem; font-weight: 400; color: var(--text-muted);
    white-space: nowrap;
  }
  .acoes-sheet-item .btn-icon { width: 20px; height: 20px; flex: 0 0 auto; }
  .acoes-sheet-item .btn-icon svg { width: 100%; height: 100%; display: block; }
  .acoes-sheet-fechar {
    min-height: 52px; margin-top: 4px;
    background: none; border: none; box-shadow: none;
    font-family: inherit; font-size: 1rem; font-weight: 700; color: var(--ink);
  }
  .acoes-sheet-fechar:hover { background: none; }

  /* confirmação de ação que escreve no Tiny */
  .acoes-sheet-confirma {
    background: #FBEFD1; border: 1.5px solid var(--gold);
    border-radius: var(--radius-sm, 12px); padding: 14px;
    display: flex; flex-direction: column; gap: 10px;
  }
  .acoes-sheet-confirma p { margin: 0; font-size: 0.92rem; line-height: 1.45; }
  .acoes-sheet-confirma .linha { display: flex; gap: 8px; }
  .acoes-sheet-confirma .linha > * { flex: 1; min-height: 48px; justify-content: center; }

  /* o botão "···" que abre o sheet */
  .btn-mais-acoes {
    width: 48px; height: 48px; flex: 0 0 auto;
    background: var(--surface, #FFFDF8);
    border: 1.5px solid rgba(10, 17, 48, 0.22);
    border-radius: var(--radius-sm, 12px);
    box-shadow: none;
    color: var(--ink); font-size: 1.2rem; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
  }
  .btn-mais-acoes:hover { background: var(--surface, #FFFDF8); }

  /* no celular, as ações secundárias saem da célula e vão pro sheet */
  .tabela-carrinho td[data-col="acesso"] .btn-convite,
  .tabela-carrinho td.celula-acoes form:not(:first-child) { display: none; }

  /* --- 12. erro e vazio com saída --------------------------------------- */

  .estado-erro, .estado-vazio {
    background: var(--surface, #FFFDF8);
    border: 1.5px solid rgba(10, 17, 48, 0.14);
    border-radius: var(--radius-md, 14px);
    padding: 22px 18px; margin: 4px 0 12px;
    display: flex; flex-direction: column; gap: 10px; align-items: flex-start;
  }
  .estado-erro { border-left: 5px solid #8A2F1E; }
  .estado-erro h3, .estado-vazio h3 { margin: 0; font-size: 1.05rem; }
  .estado-erro p, .estado-vazio p { margin: 0; font-size: 0.92rem; line-height: 1.5; color: var(--text-muted); }
  .estado-erro .acao, .estado-vazio .acao {
    min-height: 48px; padding: 0 20px; margin-top: 4px;
    display: inline-flex; align-items: center;
    border-radius: var(--radius-sm, 10px);
    background: var(--gold); color: var(--ink);
    font-size: 0.98rem; font-weight: 700; text-decoration: none;
  }
  .estado-erro .detalhe-tecnico {
    font-family: var(--font-mono, monospace); font-size: 0.72rem;
    color: var(--text-muted); word-break: break-word;
  }
  .estado-erro .detalhe-tecnico summary { cursor: pointer; min-height: 32px; display: flex; align-items: center; }
}
