/*
Theme Name: NR OpenBus
Theme URI: https://openbus.novosrumosturismo.com.br/
Author: VBU Tecnologia
Description: Tema operacional completo do NR OpenBus, com os módulos, shortcodes e integrações do sistema incorporados ao tema.
Version: 1.4.74
Requires at least: 6.2
Tested up to: 6.8
Requires PHP: 7.4
Text Domain: nr-openbus
*/

/*
 * Tema de transição: propositalmente neutro.
 * Toda a apresentação dos módulos permanece sob responsabilidade dos estilos
 * incorporados aos snippets originais, sem uma segunda camada visual do tema.
 */
html { min-height: 100%; }
body {
  min-height: 100vh;
  margin: 0;
  padding: 0;
  background:
    radial-gradient(circle at 12% 12%, rgba(255,255,255,.10) 0, rgba(255,255,255,0) 32%),
    linear-gradient(145deg, #4a515c 0%, #30343b 55%, #23272e 100%);
  background-attachment: fixed;
}
img { max-width: 100%; height: auto; }

/* Página inicial institucional do NR OpenBus. */
body.home.nr-openbus-theme,
body.front-page.nr-openbus-theme {
  background: #f4771c;
}

body.home.nr-openbus-theme #conteudo,
body.front-page.nr-openbus-theme #conteudo {
  min-height: 100vh;
}

.nr-access-page {
  --nr-orange: #f47920;
  --nr-orange-dark: #d85200;
  --nr-graphite: #20262d;
  position: relative;
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(430px, .82fr) minmax(520px, 1.18fr);
  overflow: hidden;
  color: #fff;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f4771c;
}

.nr-access-copy {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  padding: clamp(38px, 6vw, 96px);
  background:
    radial-gradient(circle at 12% 12%, rgba(255,255,255,.2) 0, rgba(255,255,255,0) 30%),
    linear-gradient(145deg, #ff963d 0%, #f57a20 52%, #e85e08 100%);
}

.nr-access-copy::after { display: none; }

.nr-access-inner { width: min(100%, 560px); margin-inline: auto; }

.nr-access-logo-wrap {
  width: fit-content;
  max-width: 100%;
  margin-bottom: clamp(42px, 8vh, 84px);
  padding: 15px 20px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 18px;
  background: rgba(255,255,255,.97);
  box-shadow: 0 12px 28px rgba(0,0,0,.2);
}

.nr-access-logo { display: block; width: auto; max-width: min(330px, 70vw); max-height: 88px; object-fit: contain; }
.nr-access-eyebrow { display: flex; align-items: center; gap: 10px; margin: 0 0 18px; color: rgba(255,255,255,.9); font-size: 12px; font-weight: 850; letter-spacing: .16em; text-transform: uppercase; }
.nr-access-eyebrow::before { content: ""; width: 34px; height: 3px; border-radius: 3px; background: rgba(255,255,255,.9); }
.nr-access-title { max-width: 590px; margin: 0; color: #fff; font-size: clamp(36px, 4vw, 60px); font-weight: 820; letter-spacing: -.04em; line-height: 1.06; }
.nr-access-text { max-width: 510px; margin: 24px 0 0; color: rgba(255,255,255,.88); font-size: clamp(15px, 1.25vw, 18px); line-height: 1.65; }

.nr-access-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 15px; margin-top: 36px; }
.nr-access-button {
  min-height: 58px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 14px 24px;
  border: 1px solid rgba(255,255,255,.72);
  border-radius: 14px;
  color: #d95605 !important;
  font-size: 15px;
  font-weight: 850;
  text-decoration: none !important;
  background: linear-gradient(135deg, #fff 0%, #fff8f2 100%);
  box-shadow: 0 14px 30px rgba(138,53,0,.22), inset 0 1px 0 rgba(255,255,255,.9);
  transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
}
.nr-access-button:hover { color: #c44800 !important; filter: brightness(1.02); transform: translateY(-2px); box-shadow: 0 18px 38px rgba(138,53,0,.3); }
.nr-access-button:focus-visible { outline: 3px solid rgba(255,255,255,.88); outline-offset: 4px; }
.nr-access-button svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s ease; }
.nr-access-button:hover svg { transform: translateX(3px); }
.nr-access-security { display: inline-flex; align-items: center; gap: 8px; color: rgba(255,255,255,.84); font-size: 12px; font-weight: 650; }
.nr-access-security svg { width: 15px; height: 15px; fill: none; stroke: #fff; stroke-width: 2; }

.nr-access-visual { position: relative; min-height: 100%; overflow: hidden; background: #2c3034; }
.nr-access-photo { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; object-position: center; transform: scale(1.01); animation: nrAccessReveal 1s ease-out both; }
.nr-access-visual::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(0deg, rgba(12,15,18,.5) 0%, transparent 38%); }
.nr-access-photo-label { position: absolute; left: clamp(30px, 4vw, 60px); bottom: clamp(28px, 5vh, 54px); z-index: 2; padding-left: 15px; border-left: 4px solid var(--nr-orange); text-shadow: 0 2px 12px rgba(0,0,0,.55); }
.nr-access-photo-label strong { display: block; color: #fff; font-size: clamp(18px, 1.6vw, 24px); line-height: 1.15; }
.nr-access-photo-label span { display: block; margin-top: 5px; color: rgba(255,255,255,.8); font-size: 13px; }

body.home.nr-openbus-theme .nr-theme-top-actions,
body.front-page.nr-openbus-theme .nr-theme-top-actions { display: none !important; }

@keyframes nrAccessReveal { from { opacity: .45; transform: scale(1.055); } to { opacity: 1; transform: scale(1.01); } }

@media (max-width: 980px) {
  .nr-access-page { grid-template-columns: 1fr; grid-template-rows: auto minmax(350px, 48svh); }
  .nr-access-copy { padding: 38px clamp(24px, 7vw, 68px) 52px; }
  .nr-access-copy::after { display: none; }
  .nr-access-inner { width: 100%; }
  .nr-access-logo-wrap { margin-bottom: 34px; }
  .nr-access-visual { min-height: 350px; }
  .nr-access-visual::before { background: linear-gradient(0deg, rgba(10,13,16,.58), transparent 55%); }
}

@media (max-width: 560px) {
  .nr-access-page { grid-template-rows: auto minmax(300px, 42svh); }
  .nr-access-copy { padding: 24px 20px 38px; }
  .nr-access-logo-wrap { margin-bottom: 28px; padding: 11px 14px; border-radius: 14px; }
  .nr-access-logo { max-width: min(280px, 68vw); max-height: 68px; }
  .nr-access-title { font-size: clamp(35px, 11vw, 49px); }
  .nr-access-text { margin-top: 18px; font-size: 15px; }
  .nr-access-actions { align-items: stretch; flex-direction: column; margin-top: 28px; }
  .nr-access-button { width: 100%; box-sizing: border-box; }
  .nr-access-security { justify-content: center; }
  .nr-access-photo-label { left: 22px; bottom: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  .nr-access-photo { animation: none; }
  .nr-access-button { transition: none; }
}

.nr-theme-top-actions {
  position: relative;
  z-index: 20;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  left: 50%;
  transform: translateX(-50%);
  max-width: calc(100vw - 24px);
  margin: 14px auto 22px;
  padding: 6px;
  border: 1px solid rgba(17,24,39,.07);
  border-radius: 16px;
  background: rgba(255,255,255,.94);
  box-shadow: 0 10px 30px rgba(17,24,39,.10), inset 0 1px 0 rgba(255,255,255,.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.nr-theme-top-button {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 14px;
  border: 0;
  border-radius: 11px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 12.5px;
  font-weight: 800;
  line-height: 1;
  text-decoration: none !important;
  white-space: nowrap;
  cursor: pointer;
  transition: transform .18s ease, background .18s ease, color .18s ease, box-shadow .18s ease;
}

.nr-theme-top-icon {
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  flex: 0 0 26px;
}

.nr-theme-top-button svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nr-theme-top-button--back {
  color: #475467 !important;
  background: transparent;
}

.nr-theme-top-button--back .nr-theme-top-icon {
  color: #475467;
  background: #f2f4f7;
}

.nr-theme-top-button--back:hover {
  color: #101828 !important;
  background: #f8fafc;
  transform: translateY(-1px);
}

.nr-theme-top-button--menu {
  color: #fff !important;
  background: linear-gradient(135deg, #f57a1f 0%, #e85d04 100%);
  box-shadow: 0 6px 16px rgba(232,93,4,.22);
}

.nr-theme-top-button--menu .nr-theme-top-icon {
  color: #fff;
  background: rgba(255,255,255,.16);
}

.nr-theme-top-button--menu:hover {
  color: #fff !important;
  transform: translateY(-1px);
  background: linear-gradient(135deg, #fb8129 0%, #df5200 100%);
  box-shadow: 0 9px 21px rgba(232,93,4,.28);
}

.nr-theme-top-button:focus-visible {
  outline: 3px solid rgba(245,122,31,.22);
  outline-offset: 3px;
}

@media (max-width: 782px) {
  .nr-theme-top-actions {
    margin: 10px auto 16px;
    padding: 5px;
    border-radius: 14px;
  }
  .nr-theme-top-button {
    min-height: 38px;
    padding: 7px 11px;
    font-size: 11.5px;
    gap: 6px;
  }
  .nr-theme-top-icon {
    width: 24px;
    height: 24px;
    flex-basis: 24px;
  }
}

@media (max-width: 420px) {
  .nr-theme-top-actions {
    width: calc(100vw - 20px);
    box-sizing: border-box;
  }
  .nr-theme-top-button {
    flex: 1 1 0;
    padding-inline: 8px;
    white-space: normal;
  }
}

@media print {
  body { background: #fff; }
  .nr-theme-top-actions { display: none !important; }
}

/* Cabeçalho de usuário do tema — também prevalece durante a transição do Code Snippets. */
.nr-header-usuario {
  position: relative;
  width: 100%;
  min-height: 88px;
  padding: 10px 14px;
  display: grid;
  grid-template-columns: minmax(170px,1fr) auto minmax(170px,1fr);
  align-items: center;
  gap: 18px;
  box-sizing: border-box;
  overflow: hidden;
  background: linear-gradient(135deg,rgba(255,255,255,.98),rgba(255,250,246,.96));
  border: 1px solid rgba(255,255,255,.72);
  border-radius: 18px;
  box-shadow: 0 12px 34px rgba(112,48,7,.13);
}
.nr-header-usuario::before { content:""; position:absolute; left:0; top:16px; bottom:16px; width:4px; border-radius:0 5px 5px 0; background:linear-gradient(180deg,#ff8a25,#e95200); }

.nr-header-datetime {
  grid-column: 1;
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 148px;
  padding: 7px 10px 7px 8px;
  border: 1px solid #edf0f3;
  border-radius: 14px;
  background: rgba(255,255,255,.96);
  box-shadow: 0 6px 18px rgba(31,41,55,.07);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.nr-header-datetime-icon {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: #e65b07;
  background: linear-gradient(135deg,#fff3e9,#ffe2ca);
}

.nr-header-datetime-icon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nr-header-datetime-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  line-height: 1.08;
}

.nr-header-date {
  display: block;
  color: #727983;
  font-size: 10.5px;
  font-weight: 750;
  white-space: nowrap;
}

.nr-header-time {
  display: block;
  margin-top: 4px;
  color: #242a31;
  font-size: 17px;
  font-weight: 900;
  letter-spacing: .035em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.nr-header-brand { grid-column:2; display:flex; align-items:center; justify-content:center; min-width:190px; }
.nr-header-brand img { display:block; width:auto; height:auto; max-width:230px; max-height:66px; object-fit:contain; }
.nr-header-user-compact { grid-column:3; justify-self:end; display:flex; align-items:center; gap:10px; min-width:0; padding:7px 8px; border:1px solid #edf0f3; border-radius:14px; background:#fff; box-shadow:0 6px 18px rgba(31,41,55,.07); }
.nr-header-user-compact .usuario-foto { width:44px; height:44px; flex:0 0 44px; }
.nr-header-user-compact .usuario-foto img { display:block; width:44px; height:44px; border:2px solid #ffdfc8; border-radius:50%; object-fit:cover; }
.nr-header-user-copy { min-width:0; display:flex; flex-direction:column; line-height:1.16; }
.nr-header-user-copy .usuario-bemvindo { margin:0 0 2px; color:#8a919b; font-size:10px; font-weight:600; }
.nr-header-user-copy .usuario-nome { max-width:180px; overflow:hidden; color:#242a31; font-size:13px; font-weight:800; text-overflow:ellipsis; white-space:nowrap; }
.nr-header-user-copy .usuario-cargo { margin:2px 0 0; color:#e65b07; font-size:10px; font-weight:750; }
.nr-header-user-compact .btn-logout { width:38px; height:38px; flex:0 0 38px; display:inline-flex; align-items:center; justify-content:center; padding:0; border-radius:11px; background:linear-gradient(135deg,#ff7a18,#e65300); color:#fff; text-decoration:none; box-shadow:0 6px 14px rgba(230,83,0,.22); transition:transform .18s ease,filter .18s ease; }
.nr-header-user-compact .btn-logout:hover { color:#fff; filter:brightness(1.06); transform:translateY(-1px); }
.nr-header-user-compact .btn-logout svg { width:17px; height:17px; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }

@media (max-width:760px) {
  .nr-header-usuario { min-height:0; grid-template-columns:1fr; gap:10px; padding:12px; }
  .nr-header-datetime,.nr-header-brand,.nr-header-user-compact { grid-column:1; justify-self:center; }
  .nr-header-datetime { width:min(100%,330px); box-sizing:border-box; justify-content:center; }
  .nr-header-brand img { max-width:min(220px,72vw); max-height:58px; }
  .nr-header-user-compact { width:min(100%,330px); justify-content:center; }
  .nr-header-user-copy { flex:1; }
  .nr-header-user-copy .usuario-nome { max-width:none; }
}
