/* ===== LifeDent — Próximas Consultas: Revisões (reset estável) ===== */
/* Escopo isolado: só vale dentro de .ld-rev para não conflitar com o resto do tema. */

.ld-rev {
  --ld-blue:#2563EB;
  --ld-ink:#0f172a;
  --ld-ink-2:#46576b;
  --ld-line:#e6edf5;
  --ld-bg:#f7f9fc;
  --ld-card:#fff;
  --wrap:1120px;
}

/* Fundo e título da página */
.ld-rev.path-proxima-consulta main { background: var(--ld-bg); }
.ld-rev.path-proxima-consulta h1{
  font:600 clamp(22px,2.4vw,28px)/1.2 "Segoe UI",system-ui,Arial,sans-serif;
  color:var(--ld-ink);
  margin: calc(var(--drupal-displace-offset-top,72px) + 10px) auto 12px;
  max-width:var(--wrap);
  padding:0 16px;
  letter-spacing:.2px;
}
.ld-rev.path-proxima-consulta h1::after{
  content:""; display:block; height:3px; width:60px; margin:8px 0 0;
  background:var(--ld-blue); border-radius:4px;
}

/* Container da view/tabela */
.ld-rev .ld-rev__wrap{
  max-width:var(--wrap);
  margin:14px auto 40px;
  padding:0 12px;
  overflow:auto; /* rolagem horizontal se precisar */
}

/* Tabela base (planilha) */
.ld-rev .views-table{
  width:100%;
  border-collapse:separate; border-spacing:0;
  table-layout:fixed;                   /* colunas estáveis */
  background:var(--ld-card);
  border:1px solid var(--ld-line);
  border-radius:12px; overflow:hidden;
  box-shadow:0 6px 18px rgba(2,6,23,.08);
  font:400 14px/1.45 "Segoe UI",system-ui,Arial;
}

/* Cabeçalho simples (NÃO sticky por padrão) */
.ld-rev thead, .ld-rev thead tr{ background:#f7f9ff; }
.ld-rev thead th{
  color:#0f172a;
  padding:10px 12px;
  border-bottom:1px solid var(--ld-line);
  font-weight:700;
  text-transform:none; letter-spacing:.15px;
  white-space:nowrap;
  position:static;
}

/* Linhas e células */
.ld-rev tbody tr{ background:#fff; }
.ld-rev tbody td{
  padding:8px 12px;
  border-bottom:1px solid var(--ld-line);
  color:var(--ld-ink-2);
  vertical-align:middle;
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}
.ld-rev tbody tr:last-child td{ border-bottom:0; }

/* Zebra + hover discreto */
.ld-rev tbody tr:nth-child(odd){ background:#fbfdff; }
.ld-rev tbody tr:hover td{ background:#f4f8ff; }

/* ---------- Larguras por coluna ----------
   Ordem recomendada:
   [Ícone opcional] | Data | Paciente | Procedimento | Ações
   Ajuste os nth-child se sua view tiver ordem diferente.
------------------------------------------- */
/* Ícone (se existir) */
.ld-rev .views-table thead th:nth-child(1),
.ld-rev .views-table tbody td:nth-child(1){ width:28px; text-align:center; }

/* Data */
.ld-rev .views-table thead th:nth-child(2),
.ld-rev .views-table tbody td:nth-child(2){ width:132px; }

/* Paciente */
.ld-rev .views-table thead th:nth-child(3),
.ld-rev .views-table tbody td:nth-child(3){
  width:34%;
  text-transform:uppercase; letter-spacing:.2px; font-weight:600; color:#253041;
}

/* Procedimento */
.ld-rev .views-table thead th:nth-child(4),
.ld-rev .views-table tbody td:nth-child(4){ width:auto; color:#304559; }

/* Ações */
.ld-rev .views-table thead th:last-child,
.ld-rev .views-table tbody td:last-child{ width:80px; text-align:right; }
.ld-rev .views-table tbody td:last-child a,
.ld-rev .views-table tbody td:last-child button{
  display:inline-flex; align-items:center; justify-content:center;
  width:34px; height:30px; border-radius:10px;
  border:1px solid #dfe7fb; background:#fff; color:#475569; text-decoration:none;
}
.ld-rev .views-table tbody td:last-child a:hover{ background:#eef4ff; }

/* Links padrão */
.ld-rev tbody a{ color:#17379d; text-decoration:none; }
.ld-rev tbody a:hover{ text-decoration:underline; }

/* ====== MODOS OPCIONAIS ====== */

/* 1) Sem coluna de ícone (Data vira 1ª coluna).
   Ative adicionando 'no-icon-col' no <body>. */
.ld-rev.no-icon-col .views-table thead th:nth-child(1),
.ld-rev.no-icon-col .views-table tbody td:nth-child(1){ width:132px; }     /* Data */
.ld-rev.no-icon-col .views-table thead th:nth-child(2),
.ld-rev.no-icon-col .views-table tbody td:nth-child(2){ width:34%; }       /* Paciente */
.ld-rev.no-icon-col .views-table thead th:nth-child(3),
.ld-rev.no-icon-col .views-table tbody td:nth-child(3){ width:auto; }      /* Procedimento */

/* Reforço de leitura no modo sem ícone */
.ld-rev.no-icon-col .views-table tbody td:nth-child(1){ color:#253041; font-weight:700; } /* Data */
.ld-rev.no-icon-col .views-table tbody td:nth-child(2){ text-transform:uppercase; letter-spacing:.2px; font-weight:600; color:#253041; } /* Paciente */
.ld-rev.no-icon-col .views-table tbody td:nth-child(3){ color:#304559; } /* Procedimento */

/* 2) Alta densidade (linhas compactas). Ative com 'hd-grid' no <body>. */
.ld-rev.hd-grid .views-table{ font-size:13px; }
.ld-rev.hd-grid tbody td{ padding:6px 8px; }
.ld-rev.hd-grid thead th{ padding:8px 10px; }

/* 3) Cabeçalho sticky — ATIVE com 'sticky-head' no <body>.
      Desativado por padrão para evitar sobreposição. */
.ld-rev.sticky-head thead th{
  position:sticky;
  top:calc(var(--drupal-displace-offset-top,0px) + 0px);
  z-index:2; background:#f7f9ff;
}

/* Scrollbar quando houver rolagem horizontal */
.ld-rev .ld-rev__wrap::-webkit-scrollbar{ height:10px; }
.ld-rev .ld-rev__wrap::-webkit-scrollbar-thumb{ background:#cfd9ff; border-radius:6px; }

/* Botão “Menu” flutuante (se existir) */
#pacienteMenuBtn{ top: calc(var(--drupal-displace-offset-top, 60px) + 12px) !important; }
