/* styles/familia-textos-instagram.css
   Central de Comunicação Instagram — mobile-first.
   Botão COPIAR é o herói: gigante, sticky, alto contraste. */

.ti-screen {
  max-width: 720px;
  margin: 0 auto;
  padding: 1rem;
  color: #e8eef9;
}

.ti-hero {
  text-align: center;
  padding: 1.2rem 0 0.6rem;
}
.ti-titulo {
  font-family: 'Orbitron', monospace;
  font-size: 1.4rem;
  margin: .4rem 0 .2rem;
  letter-spacing: 1px;
}
.ti-subtitulo {
  font-size: .85rem;
  opacity: .7;
  margin: 0;
}

/* Tabs */
.ti-tabs {
  display: flex;
  gap: .35rem;
  overflow-x: auto;
  padding: .8rem 0;
  scrollbar-width: thin;
  position: sticky;
  top: 0;
  background: rgba(6,12,24,.92);
  backdrop-filter: blur(8px);
  z-index: 10;
  border-bottom: 1px solid rgba(255,255,255,.06);
  align-items: center;
}
.ti-tab {
  flex: 0 0 auto;
  padding: .55rem .85rem;
  border-radius: 999px;
  background: rgba(255,255,255,.05);
  color: #cbd5e1;
  border: 1px solid rgba(255,255,255,.1);
  font-family: 'Orbitron', monospace;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .5px;
  cursor: pointer;
  white-space: nowrap;
  transition: all .15s ease;
}
.ti-tab:hover { background: rgba(255,255,255,.1); }
.ti-tab-ativa {
  background: rgba(240,192,64,.18);
  color: #F0C040;
  border-color: #F0C040;
}
.ti-stat-mini {
  margin-left: auto;
  font-size: .7rem;
  color: rgba(255,255,255,.5);
  font-family: 'Orbitron', monospace;
  white-space: nowrap;
  padding: 0 .5rem;
}

/* Content */
.ti-content { padding: .8rem 0 4rem; }

/* HOJE banner */
.ti-hoje-banner {
  background: linear-gradient(90deg, rgba(82,183,136,.25), rgba(82,183,136,.05));
  border-left: 4px solid #52B788;
  padding: .8rem 1rem;
  border-radius: .5rem;
  margin-bottom: 1rem;
  font-family: 'Orbitron', monospace;
  font-size: .8rem;
  color: #52B788;
  letter-spacing: .5px;
}

/* Lista cards compactos */
.ti-lista { display: flex; flex-direction: column; gap: .5rem; }

.ti-grp { margin-bottom: 1.2rem; }
.ti-grp-hdr {
  font-family: 'Orbitron', monospace;
  font-size: .8rem;
  color: #F0C040;
  letter-spacing: 1px;
  padding: .5rem 0 .4rem;
  border-bottom: 1px solid rgba(240,192,64,.2);
  margin-bottom: .5rem;
}

.ti-card-mini {
  display: grid;
  grid-template-columns: auto auto 1fr;
  grid-template-rows: auto auto;
  gap: .15rem .6rem;
  align-items: center;
  text-align: left;
  padding: .7rem .9rem;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: .5rem;
  color: inherit;
  cursor: pointer;
  width: 100%;
  font-family: inherit;
}
.ti-card-mini:hover { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.15); }
.ti-card-mini-hoje {
  background: rgba(82,183,136,.12);
  border-color: #52B788;
}
.ti-card-mini-status { font-size: 1.1rem; grid-row: 1 / span 2; }
.ti-card-mini-num {
  font-family: 'Orbitron', monospace;
  font-size: .75rem;
  color: #F0C040;
  letter-spacing: .5px;
  white-space: nowrap;
}
.ti-card-mini-titulo {
  font-weight: 600;
  font-size: .95rem;
}
.ti-card-mini-meta {
  grid-column: 2 / span 2;
  font-size: .72rem;
  color: rgba(255,255,255,.55);
  font-family: 'Orbitron', monospace;
}

/* Detalhe */
.ti-detalhe { display: flex; flex-direction: column; gap: 1rem; }
.ti-detalhe-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.ti-back {
  background: transparent;
  color: #F0C040;
  border: 1px solid rgba(240,192,64,.35);
  padding: .4rem .7rem;
  border-radius: .4rem;
  font-family: 'Orbitron', monospace;
  font-size: .75rem;
  cursor: pointer;
}
.ti-detalhe-status {
  font-family: 'Orbitron', monospace;
  font-size: .75rem;
  opacity: .7;
}
.ti-detalhe-titulo {
  font-family: 'Orbitron', monospace;
  font-size: 1.15rem;
  margin: 0;
  line-height: 1.3;
}
.ti-detalhe-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
}
.ti-pill {
  background: rgba(255,255,255,.06);
  padding: .25rem .6rem;
  border-radius: 999px;
  font-size: .72rem;
  color: rgba(255,255,255,.75);
}

.ti-secao {
  background: rgba(255,255,255,.03);
  padding: .8rem;
  border-radius: .5rem;
  border: 1px solid rgba(255,255,255,.06);
}
.ti-section-titulo {
  font-family: 'Orbitron', monospace;
  font-size: .78rem;
  color: #F0C040;
  margin-bottom: .5rem;
  letter-spacing: .5px;
}
.ti-pre {
  white-space: pre-wrap;
  font-family: inherit;
  font-size: .88rem;
  line-height: 1.5;
  color: rgba(255,255,255,.85);
  margin: 0;
}
.ti-legenda {
  width: 100%;
  min-height: 220px;
  background: rgba(0,0,0,.4);
  color: #e8eef9;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: .5rem;
  padding: .8rem;
  font-family: inherit;
  font-size: .95rem;
  line-height: 1.5;
  resize: vertical;
  box-sizing: border-box;
}

/* Placeholders */
.ti-placeholders {
  background: rgba(240,192,64,.08);
  padding: .8rem;
  border-radius: .5rem;
  border: 1px dashed #F0C040;
  display: flex;
  flex-direction: column;
  gap: .5rem;
}
.ti-ph-label {
  display: flex;
  align-items: center;
  gap: .6rem;
}
.ti-ph-label > span {
  font-family: 'Orbitron', monospace;
  font-size: .72rem;
  color: #F0C040;
  white-space: nowrap;
}
.ti-ph-input {
  flex: 1;
  background: rgba(0,0,0,.35);
  border: 1px solid rgba(255,255,255,.12);
  color: #fff;
  padding: .45rem .6rem;
  border-radius: .35rem;
  font-size: .9rem;
}

/* Toggle */
.ti-toggle-row { display: flex; gap: .4rem; }
.ti-toggle {
  flex: 1;
  padding: .5rem;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
  color: rgba(255,255,255,.7);
  border-radius: .4rem;
  cursor: pointer;
  font-family: 'Orbitron', monospace;
  font-size: .8rem;
}
.ti-toggle-on {
  background: rgba(240,192,64,.18);
  color: #F0C040;
  border-color: #F0C040;
}

/* Chips hashtag */
.ti-chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.ti-chip {
  padding: .35rem .7rem;
  border-radius: 999px;
  background: rgba(255,255,255,.04);
  color: rgba(255,255,255,.6);
  border: 1px solid rgba(255,255,255,.1);
  cursor: pointer;
  font-family: 'Orbitron', monospace;
  font-size: .72rem;
  font-weight: 600;
}
.ti-chip-on {
  background: color-mix(in srgb, var(--c) 22%, transparent);
  color: var(--c);
  border-color: var(--c);
}

/* Actions */
.ti-actions-fixas {
  position: sticky;
  bottom: 0;
  background: rgba(6,12,24,.95);
  backdrop-filter: blur(10px);
  padding: .8rem 0;
  border-top: 1px solid rgba(255,255,255,.08);
  margin: 0 -1rem;
  padding-left: 1rem;
  padding-right: 1rem;
  z-index: 5;
}
.ti-btn {
  width: 100%;
  padding: .9rem 1rem;
  border-radius: .5rem;
  font-family: 'Orbitron', monospace;
  font-weight: 700;
  font-size: .9rem;
  letter-spacing: .5px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all .15s ease;
}
.ti-btn-primario {
  background: linear-gradient(90deg, #F0C040, #FFD662);
  color: #06121d;
  font-size: 1rem;
  padding: 1.1rem;
  box-shadow: 0 4px 14px rgba(240,192,64,.3);
}
.ti-btn-primario:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(240,192,64,.4); }
.ti-copy-ok { background: linear-gradient(90deg, #52B788, #6FCFA5) !important; }
.ti-actions-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .4rem;
  margin-top: .5rem;
}
.ti-btn-sec {
  background: rgba(255,255,255,.06);
  color: #cbd5e1;
  border-color: rgba(255,255,255,.12);
  font-size: .75rem;
  padding: .65rem .4rem;
}
.ti-btn-sec:hover { background: rgba(255,255,255,.12); }
.ti-btn-undo { background: rgba(82,183,136,.18); color: #52B788; border-color: #52B788; }

/* Notas + Falas */
.ti-notas, .ti-falas {
  background: rgba(255,255,255,.03);
  padding: .8rem;
  border-radius: .5rem;
  border: 1px solid rgba(255,255,255,.06);
}
.ti-notas ul, .ti-falas ul { margin: .3rem 0 .5rem; padding-left: 1.2rem; }
.ti-notas li, .ti-falas li { font-size: .85rem; line-height: 1.5; margin-bottom: .25rem; }
.ti-fala-card {
  background: rgba(0,0,0,.25);
  padding: .7rem;
  border-radius: .4rem;
  margin-bottom: .5rem;
  border-left: 3px solid #00B4D8;
}
.ti-fala-card p { font-size: .85rem; line-height: 1.5; margin: .4rem 0; opacity: .85; }
.ti-fala-perguntas { font-size: .85rem; }
.ti-fala-perguntas > div { margin: .3rem 0; }

/* Situação accordion */
.ti-situacao {
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: .5rem;
  padding: .6rem .9rem;
  margin-bottom: .5rem;
}
.ti-situacao summary { cursor: pointer; font-size: .9rem; padding: .2rem 0; }
.ti-situacao[open] summary { color: #F0C040; }

/* Hashtag grupos (aba HASHTAGS) */
.ti-grupo {
  background: rgba(255,255,255,.04);
  padding: 1rem;
  border-radius: .5rem;
  margin-bottom: .8rem;
  border-left: 4px solid var(--c);
}
.ti-grupo-hdr {
  font-family: 'Orbitron', monospace;
  font-size: .85rem;
  color: var(--c);
  margin-bottom: .25rem;
}
.ti-grupo-desc { font-size: .8rem; opacity: .7; margin-bottom: .6rem; }
.ti-grupo-tags { font-size: .85rem; line-height: 1.8; margin-bottom: .7rem; }
.ti-tag {
  background: rgba(255,255,255,.07);
  padding: .15rem .5rem;
  border-radius: 4px;
  margin-right: .25rem;
  display: inline-block;
}

.ti-empty {
  text-align: center;
  padding: 2rem 1rem;
  color: rgba(255,255,255,.5);
  font-style: italic;
}

@media (min-width: 720px) {
  .ti-actions-row { grid-template-columns: repeat(3, 1fr); }
}

/* Atalho destacado no dashboard (para o card de Textos Instagram) */
.fd-atalho-destaque {
  background: linear-gradient(90deg, rgba(240,192,64,.18), rgba(240,192,64,.05)) !important;
  border-color: #F0C040 !important;
  color: #F0C040 !important;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(240,192,64,.15);
}

/* ── Fase B: Busca, Calendário, Janela, Nav ────────────────────── */

/* Busca rápida */
.ti-busca-wrap {
  position: relative;
  margin: .6rem 0 .2rem;
}
.ti-busca-icon {
  position: absolute;
  left: .8rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: .9rem;
  opacity: .6;
  pointer-events: none;
}
.ti-busca {
  width: 100%;
  padding: .7rem .8rem .7rem 2.3rem;
  background: rgba(0,0,0,.35);
  color: #fff;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: .5rem;
  font-size: .95rem;
  font-family: inherit;
  box-sizing: border-box;
}
.ti-busca:focus { outline: 2px solid rgba(240,192,64,.4); border-color: #F0C040; }
.ti-busca-limpa {
  position: absolute;
  right: .5rem;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,.08);
  border: none;
  color: #fff;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: .9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ti-busca-banner {
  background: rgba(0,180,216,.12);
  border-left: 4px solid #00B4D8;
  padding: .7rem 1rem;
  border-radius: .4rem;
  margin-bottom: .8rem;
  font-size: .9rem;
  color: #00B4D8;
}

/* Calendário timeline */
.ti-cal { display: flex; flex-direction: column; gap: .4rem; }
.ti-cal-mes {
  font-family: 'Orbitron', monospace;
  font-size: .85rem;
  color: #F0C040;
  letter-spacing: 2px;
  padding: 1rem 0 .3rem;
  border-bottom: 1px solid rgba(240,192,64,.25);
  margin-top: .3rem;
}
.ti-cal-item {
  display: grid;
  grid-template-columns: 70px 1fr auto;
  gap: .8rem;
  align-items: center;
  padding: .7rem .8rem;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: .5rem;
  color: inherit;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  width: 100%;
}
.ti-cal-item:hover { background: rgba(255,255,255,.08); }
.ti-cal-hoje {
  background: rgba(82,183,136,.15);
  border-color: #52B788;
  box-shadow: 0 0 0 1px rgba(82,183,136,.3);
}
.ti-cal-postado { opacity: .65; }
.ti-cal-atrasado {
  border-left: 4px solid #E63946;
}
.ti-cal-data {
  display: flex;
  flex-direction: column;
  text-align: center;
}
.ti-cal-dia {
  font-family: 'Orbitron', monospace;
  font-size: .85rem;
  font-weight: 700;
  color: #F0C040;
}
.ti-cal-semana {
  font-family: 'Orbitron', monospace;
  font-size: .65rem;
  color: rgba(255,255,255,.5);
  letter-spacing: 1px;
}
.ti-cal-info {
  display: flex;
  flex-direction: column;
  gap: .15rem;
  min-width: 0;
}
.ti-cal-titulo {
  font-size: .9rem;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ti-cal-meta {
  font-size: .7rem;
  color: rgba(255,255,255,.55);
  font-family: 'Orbitron', monospace;
}
.ti-cal-status { font-size: 1.2rem; }

/* Banner janela ótima */
.ti-janela-banner {
  padding: .6rem .9rem;
  border-radius: .4rem;
  border-left: 4px solid;
  background: rgba(255,255,255,.04);
  font-family: 'Orbitron', monospace;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .5px;
}

/* Aviso lookahead "HOJE" */
.ti-hoje-aviso {
  background: rgba(82,183,136,.15);
  border-left: 4px solid #52B788;
  padding: .6rem .9rem;
  border-radius: .4rem;
  margin: -.5rem 0 .8rem;
  font-size: .82rem;
  color: #52B788;
}

/* Nav prev/next no detalhe */
.ti-nav-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .5rem;
  margin-top: .5rem;
}
.ti-nav-btn {
  padding: .6rem .8rem;
  background: rgba(255,255,255,.05);
  color: rgba(255,255,255,.8);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: .4rem;
  cursor: pointer;
  font-size: .8rem;
  font-family: inherit;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ti-nav-btn:hover { background: rgba(255,255,255,.1); }
.ti-nav-btn-prox { text-align: right; }

/* ── Fase C: Config panel, filtros calendário, toast ───────────────── */

/* Botão config no header */
.ti-config-btn {
  position: absolute;
  right: .35rem;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(240,192,64,.12);
  border: 1px solid rgba(240,192,64,.35);
  color: #F0C040;
  width: 36px;
  height: 36px;
  border-radius: .4rem;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ti-config-btn:hover { background: rgba(240,192,64,.2); }

/* Painel config (collapsible) */
.ti-config-panel {
  margin: .4rem 0 .2rem;
  background: rgba(255,255,255,.03);
  padding: .8rem;
  border-radius: .5rem;
  border: 1px solid rgba(240,192,64,.25);
}
.ti-config-stats {
  font-size: .85rem;
  color: rgba(255,255,255,.8);
  margin-bottom: .7rem;
  padding-bottom: .6rem;
  border-bottom: 1px solid rgba(255,255,255,.08);
  line-height: 1.6;
}
.ti-config-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .5rem;
}
.ti-config-import-label {
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.ti-btn-danger {
  background: rgba(230,57,70,.12);
  color: #E63946;
  border-color: rgba(230,57,70,.35);
  grid-column: 1 / -1;
}
.ti-btn-danger:hover { background: rgba(230,57,70,.22); }

/* Calendário: resumo + filtros */
.ti-cal-resumo {
  background: rgba(240,192,64,.08);
  padding: .7rem .9rem;
  border-radius: .5rem;
  margin-bottom: .5rem;
  border-left: 4px solid #F0C040;
}
.ti-cal-resumo-row {
  font-size: .85rem;
  line-height: 1.5;
  color: rgba(255,255,255,.85);
}
.ti-filtros {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin-bottom: .8rem;
}
.ti-filtro {
  flex: 1 1 auto;
  padding: .45rem .7rem;
  background: rgba(255,255,255,.05);
  color: rgba(255,255,255,.65);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: .4rem;
  font-family: 'Orbitron', monospace;
  font-size: .7rem;
  cursor: pointer;
  white-space: nowrap;
}
.ti-filtro:hover { background: rgba(255,255,255,.1); }
.ti-filtro-on {
  background: rgba(240,192,64,.18);
  color: #F0C040;
  border-color: #F0C040;
}

/* Toast notification */
.ti-toast {
  position: fixed;
  left: 50%;
  bottom: 80px;
  transform: translateX(-50%) translateY(20px);
  background: rgba(20, 30, 50, .95);
  color: #fff;
  padding: .7rem 1.2rem;
  border-radius: .5rem;
  font-size: .85rem;
  font-weight: 600;
  border: 1px solid rgba(255,255,255,.15);
  box-shadow: 0 6px 20px rgba(0,0,0,.5);
  z-index: 1000;
  opacity: 0;
  transition: opacity .25s ease, transform .25s ease;
  pointer-events: none;
  max-width: 90vw;
  text-align: center;
}
.ti-toast-on {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.ti-toast-sucesso { border-left: 4px solid #52B788; }
.ti-toast-erro { border-left: 4px solid #E63946; }
.ti-toast-info { border-left: 4px solid #00B4D8; }
