
:root {
  --event-primary: #203B60;
  --event-accent: #D3A84C;
}

body.theme-ebrarq {
  --event-primary: #813525;
  --event-accent: #D3A84C;
}

.topbar {
  border-bottom: 4px solid var(--event-accent);
}


* {
  box-sizing: border-box;
}

html {
  font-size: 17px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: #222;
  background: #f5f5f6;
  padding-bottom: 74px;
}

button,
input {
  font: inherit;
}

.topbar {
  background: var(--event-primary);
  color: white;
  padding: 14px 16px;
}

.topbar strong {
  display: block;
  font-size: 1.2rem;
}

.topbar small {
  display: block;
  margin-top: 3px;
  opacity: .88;
}

.days {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding: 10px;
  background: white;
  border-bottom: 1px solid #ddd;
}

.day-btn {
  flex: 1 0 72px;
  border: 0;
  background: #eee;
  border-radius: 9px;
  padding: 9px 8px;
  text-align: center;
}

.day-btn.active {
  background: var(--event-primary);
  color: white;
}

.day-btn strong,
.day-btn small {
  display: block;
}

main {
  max-width: 900px;
  margin: auto;
  padding: 12px 10px;
}

.section-title {
  margin: 7px 2px 13px;
  font-size: 1.15rem;
}

.time-group {
  margin-bottom: 18px;
}

.time-heading {
  color: #777;
  font-weight: bold;
  margin: 7px 4px;
}

.event-card {
  background: white;
  border-radius: 11px;
  padding: 13px 13px 12px;
  margin-bottom: 9px;
  box-shadow: 0 1px 4px rgba(0,0,0,.12);
  position: relative;
}

.event-card:active {
  transform: scale(.995);
}

.card-row {
  display: flex;
  gap: 9px;
  justify-content: space-between;
  align-items: flex-start;
}

.event-type {
  font-size: .72rem;
  font-weight: bold;
  text-transform: uppercase;
  color: var(--event-primary);
  margin-bottom: 5px;
}

.event-title {
  font-weight: 700;
  line-height: 1.3;
}

.event-meta {
  margin-top: 6px;
  color: #666;
  font-size: .88rem;
  line-height: 1.4;
}

.star {
  background: transparent;
  border: 0;
  font-size: 1.45rem;
  min-width: 42px;
  min-height: 42px;
  color: #b58400;
}

.poster-session {
  border-left: 5px solid #d89315;
}

.oral-card {
  border-left: 5px solid #4677b8;
}

.general-card {
  border-left: 5px solid var(--event-accent);
}

.badge {
  display: inline-block;
  margin-top: 8px;
  background: #eee;
  border-radius: 5px;
  padding: 4px 7px;
  font-size: .72rem;
  font-weight: bold;
}

.room-block {
  background: white;
  margin-bottom: 12px;
  padding: 14px;
  border-radius: 11px;
  box-shadow: 0 1px 4px rgba(0,0,0,.1);
}

.room-block h3 {
  margin: 0 0 8px;
}

.room-line {
  padding: 8px 0;
  border-top: 1px solid #eee;
}

.search-box {
  width: 100%;
  padding: 13px;
  border: 1px solid #bbb;
  border-radius: 9px;
  font-size: 1rem;
  margin-bottom: 12px;
}

.empty {
  text-align: center;
  color: #777;
  padding: 45px 15px;
}

.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 68px;
  display: grid;
  grid-template-columns: repeat(4,1fr);
  background: white;
  border-top: 1px solid #ccc;
  z-index: 40;
}

.nav-btn {
  background: white;
  border: 0;
  padding: 5px;
  color: #666;
}

.nav-btn span,
.nav-btn small {
  display: block;
}

.nav-btn span {
  font-size: 1.35rem;
  line-height: 1.1;
}

.nav-btn small {
  margin-top: 2px;
}

.nav-btn.active {
  color: var(--event-primary);
  font-weight: bold;
}

.details-page {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: white;
  overflow-y: auto;
}

.hidden {
  display: none;
}

.details-header {
  position: sticky;
  top: 0;
  background: white;
  border-bottom: 1px solid #ddd;
  display: grid;
  grid-template-columns: 55px 1fr 55px;
  align-items: center;
  min-height: 58px;
  z-index: 10;
}

.details-header button {
  border: 0;
  background: transparent;
  font-size: 1.4rem;
}

.details-header strong {
  text-align: center;
}

#details-body {
  max-width: 760px;
  margin: auto;
  padding: 22px 18px 40px;
}

.detail-type {
  color: var(--event-primary);
  font-size: .8rem;
  font-weight: bold;
  text-transform: uppercase;
}

.detail-time {
  font-size: 1.25rem;
  font-weight: bold;
  margin-top: 10px;
}

.detail-location {
  color: #666;
  margin-top: 4px;
}

.detail-title {
  font-size: 1.3rem;
  line-height: 1.35;
  margin: 22px 0;
}

.detail-section {
  margin: 20px 0;
}

.detail-section strong {
  display: block;
  margin-bottom: 5px;
}

@media (min-width: 720px) {

  html {
    font-size: 18px;
  }

  .bottom-nav {
    left: 50%;
    transform: translateX(-50%);
    max-width: 700px;
  }
}


/* ==========================================================
   v0.5
   ========================================================== */

html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

/* ---------- programação agrupada ---------- */

.slot {
  background: white;
  border-radius: 11px;
  margin-bottom: 10px;
  box-shadow: 0 1px 4px rgba(0,0,0,.10);
  overflow: hidden;
}

.slot-header {
  width: 100%;
  border: 0;
  background: white;
  padding: 13px 14px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  text-align: left;
  align-items: center;
}

.slot-header-main {
  min-width: 0;
}

.slot-time {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--event-primary);
}

.slot-summary {
  color: #666;
  font-size: .82rem;
  margin-top: 3px;
}

.slot-arrow {
  font-size: 1.15rem;
  color: #777;
}

.slot-body {
  padding: 0 10px 10px;
  border-top: 1px solid #eee;
}

.slot-body.hidden-slot {
  display: none;
}

.slot-body .event-card {
  box-shadow: none;
  border-radius: 7px;
  margin: 9px 0 0;
  background: #fafafa;
}

/* atividades gerais não precisam ficar escondidas */
.general-direct {
  margin-bottom: 10px;
}

/* ---------- salas ---------- */

.room-selector {
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  margin-bottom: 15px;
  border: 1px solid #bbb;
  border-radius: 9px;
  background: white;
  font: inherit;
}

.room-heading {
  margin: 4px 2px 14px;
}

.room-heading h3 {
  margin: 0 0 4px;
}

.room-heading div {
  color: #666;
  font-size: .88rem;
}

.session-block {
  background: white;
  border-radius: 11px;
  margin-bottom: 14px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,.10);
}

.session-head {
  padding: 13px 14px;
  background: #f5f2f3;
  border-bottom: 1px solid #e1d9db;
}

.session-label {
  color: var(--event-primary);
  font-size: .73rem;
  text-transform: uppercase;
  font-weight: 800;
}

.session-time {
  font-weight: 800;
  margin-top: 3px;
}

.session-name {
  font-weight: 700;
  margin-top: 6px;
  line-height: 1.3;
}

.session-chair {
  color: #666;
  font-size: .85rem;
  margin-top: 6px;
}

.session-work {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid #eee;
}

.session-work:last-child {
  border-bottom: 0;
}

.session-work-time {
  color: var(--event-primary);
  font-weight: 700;
  font-size: .86rem;
}

.session-work-title {
  font-weight: 600;
  line-height: 1.32;
}

.session-work-area {
  color: #777;
  font-size: .78rem;
  margin-top: 4px;
}

/* ---------- busca ---------- */

.search-box {
  scroll-margin-top: 10px;
}

@media (max-width: 420px) {
  .session-work {
    grid-template-columns: 76px 1fr;
  }
}



/* ==========================================================
   PWA v0.6
   ========================================================== */

.connection-status {
  position: fixed;
  top: max(8px, env(safe-area-inset-top));
  right: 10px;
  z-index: 9999;
  padding: 5px 9px;
  border-radius: 14px;
  background: rgba(255,255,255,.94);
  box-shadow: 0 1px 5px rgba(0,0,0,.18);
  font-size: .72rem;
  color: #555;
  transition: opacity .3s;
}

.connection-status.offline {
  color: var(--event-primary);
  font-weight: 700;
}

.connection-status.connection-hidden {
  opacity: 0;
  pointer-events: none;
}

/* v0.6.6 - busca: onde/quando encontrar a pessoa */

.search-result-card {
  cursor: pointer;
}

.search-result-people {
  margin-top: 8px;
  line-height: 1.4;
  color: #39434a;
}

.search-result-where {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(0,0,0,.035);
  line-height: 1.55;
}

.search-result-session,
.search-result-chair {
  margin-top: 7px;
  line-height: 1.4;
}

.search-result-chair {
  font-weight: 500;
}

@media (max-width: 600px) {
  .search-result-where {
    font-size: 1rem;
  }

  .search-result-people {
    font-size: .96rem;
  }
}

/* v0.6.7 - sessões oficiais na visão por sala */

.session-official-name {
  margin-top: 4px;
  font-size: 1.08rem;
  font-weight: 700;
  line-height: 1.3;
}

.session-chair {
  margin-top: 6px;
  line-height: 1.35;
}

.session-work-authors {
  margin-top: 5px;
  font-size: .92rem;
  line-height: 1.35;
  opacity: .82;
}

@media (max-width: 600px) {
  .session-official-name {
    font-size: 1rem;
  }

  .session-chair {
    font-size: .94rem;
  }

  .session-work-authors {
    font-size: .88rem;
  }
}


/* v0.7.1 - credito PAISUME */

.site-credit {
  margin: 28px auto 92px;
  padding: 0 18px;
  text-align: center;
  font-size: .78rem;
  line-height: 1.5;
  color: #6c7378;
}

.site-credit a {
  color: var(--event-primary);
  font-weight: 700;
  text-decoration: none;
}

.site-credit a:hover,
.site-credit a:focus {
  text-decoration: underline;
}

@media (max-width: 600px) {
  .site-credit {
    margin-top: 22px;
    margin-bottom: 88px;
    font-size: .74rem;
  }
}


/* ===== UPDATE STATUS V072 START ===== */

.program-update-status {
  margin-top: 5px;
  font-size: .68rem;
  line-height: 1.4;
  color: #858b8f;
}

.program-update-status .update-detail {
  opacity: .85;
}

@media (max-width: 600px) {

  .program-update-status {
    margin-top: 4px;
    font-size: .64rem;
  }

  .program-update-status .update-detail {
    display: block;
  }
}

/* ===== UPDATE STATUS V072 END ===== */


/* Identificacao dos dois eventos */
#event-secondary {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid rgba(255,255,255,.25);
  font-size: .85rem;
  opacity: .82;
}

.topbar #event-title {
  font-size: 1.45rem;
}

.topbar #event-subtitle {
  font-size: .85rem;
  line-height: 1.4;
}


/* ===== Sessoes cientificas oficiais ===== */

.slot {
  border-left: 6px solid var(--event-accent);
  border-radius: 12px;
}

.slot-header {
  padding: 15px 17px;
  cursor: pointer;
}

.slot-kind {
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .035em;
  text-transform: uppercase;
  color: var(--event-primary);
  margin-bottom: 5px;
}

.slot-time {
  font-size: 1.12rem;
}

.slot-summary {
  font-size: .85rem;
  margin-top: 5px;
}

.slot-location,
.slot-chair {
  color: #666;
  font-size: .83rem;
  margin-top: 5px;
  line-height: 1.35;
}

.slot-body {
  padding: 0 15px 8px;
  border-top: 1px solid #e8e8e8;
}

.slot-body .event-card {
  border-left: 0;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
  margin: 0;
  padding: 14px 2px;
}

.slot-body .event-card + .event-card {
  border-top: 1px solid #e8e8e8;
}

.slot-body .event-type {
  display: none;
}

.slot-body .event-title {
  font-size: .95rem;
  line-height: 1.4;
}

.slot-body .event-meta {
  display: none;
}

.slot-body .star {
  flex-shrink: 0;
}

/* Horarios individuais das apresentacoes orais */

.session-presentation {
  padding: 12px 0;
}

.session-presentation + .session-presentation {
  border-top: 1px solid #e8e8e8;
}

.presentation-time {
  color: var(--event-primary);
  font-size: .85rem;
  font-weight: 800;
  margin-bottom: 5px;
}

.session-presentation .event-card {
  padding: 0 2px;
  margin: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}


/* Identidade visual dos eventos na Minha Agenda */

.agenda-item {
  border-left: 5px solid transparent;
  border-radius: 10px;
  padding: 12px 12px 12px 14px;
  margin-bottom: 14px;
  background: var(--card-bg, #fff);
}

.agenda-sarx {
  border-left-color: #285a86;
}

.agenda-ebrarq {
  border-left-color: #a54d3d;
}

.agenda-event-label {
  font-size: .73rem;
  font-weight: 800;
  letter-spacing: .055em;
  margin-bottom: 5px;
}

.agenda-sarx .agenda-event-label {
  color: #285a86;
}

.agenda-ebrarq .agenda-event-label {
  color: #a54d3d;
}

.agenda-date-time {
  margin: 0 0 8px 2px;
  font-size: .88rem;
  font-weight: 700;
  color: #4b5563;
}


/* Areas tematicas nas sessoes cientificas */

.slot-body .event-meta {
  display: block;
  margin-top: 5px;
  font-size: .78rem;
  line-height: 1.4;
  color: #64748b;
}


/* Areas tematicas nas sessoes cientificas */

.slot-body .event-meta {
  display: block;
  margin-top: 5px;
  font-size: .78rem;
  line-height: 1.4;
  color: #64748b;
}


/* Consulta por areas tematicas */

.area-day-heading {
  margin: 22px 0 12px;
  font-size: 1rem;
  font-weight: 800;
}

.area-work {
  padding: 10px 0;
}

.area-work + .area-work {
  border-top: 1px solid #e5e7eb;
}

.area-work .event-card {
  border: 0;
  box-shadow: none;
  background: transparent;
  margin: 0;
  padding: 0;
}

.area-work .event-type,
.area-work .event-meta {
  display: none;
}


/* =========================================
   AREAS TEMATICAS - REFINAMENTO VISUAL
   ========================================= */

/* Separacao entre os dias */
.area-day-heading {
  margin: 24px 2px 12px;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -.015em;
}

/* Cartao da sessao */
.session-block {
  border-radius: 12px;
  border-left: 5px solid var(--event-primary);
  overflow: hidden;
  margin-bottom: 16px;
  background: #fff;
  box-shadow: 0 2px 7px rgba(0,0,0,.07);
}

/* Cabecalho compacto */
.session-block .session-head {
  padding: 12px 16px;
  background: #f8f9fb;
  border-bottom: 1px solid #e8ebef;
}

.session-block .session-label {
  color: var(--event-primary);
  font-size: .73rem;
  font-weight: 800;
  letter-spacing: .035em;
}

/* Nome oficial e horario */
.session-block .session-official-name {
  font-size: 1rem;
  font-weight: 750;
  margin-top: 3px;
}

.session-block .session-time {
  font-size: .9rem;
  font-weight: 700;
  margin-top: 4px;
  color: #475569;
}

.session-block .session-name {
  font-size: .78rem;
  font-weight: 500;
  margin-top: 5px;
  color: #64748b;
}

/* Lista de trabalhos */
.session-block .session-items {
  padding: 0;
}

/* Cada trabalho */
.session-block .area-work {
  padding: 12px 16px;
  margin: 0;
}

.session-block .area-work + .area-work {
  border-top: 1px solid #edf0f3;
}

/* Cartao interno sem bordas duplicadas */
.session-block .area-work .event-card {
  border: none;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
  padding: 0;
  margin: 0;
}

/* Titulos com dimensoes equilibradas */
.session-block .area-work .event-title {
  font-size: .94rem;
  line-height: 1.45;
  font-weight: 650;
}

/* Horario individual */
.session-block .area-work .presentation-time {
  font-size: .76rem;
  font-weight: 800;
  margin-bottom: 5px;
  color: var(--event-primary);
}

/* Estrela alinhada */
.session-block .area-work .card-row {
  align-items: center;
  gap: 12px;
}

.session-block .area-work .star {
  flex-shrink: 0;
}

/* Evitar informacoes redundantes */
.session-block .area-work .event-type,
.session-block .area-work .event-meta {
  display: none;
}



/* =========================================
   AJUSTES FINAIS - AREAS TEMATICAS
   ========================================= */

/* Identidade independente do dia selecionado */
.area-session-sarx {
  --area-color: #2d3e63;
  border-left-color: var(--area-color);
}

.area-session-ebrarq {
  --area-color: #a54d3d;
  border-left-color: var(--area-color);
}

.area-session-sarx .session-label,
.area-session-sarx .presentation-time {
  color: #2d3e63;
}

.area-session-ebrarq .session-label,
.area-session-ebrarq .presentation-time {
  color: #a54d3d;
}

/* Resumo compacto da area */
.room-heading {
  margin: 12px 2px 18px;
}

.room-heading h3 {
  font-size: .95rem;
  font-weight: 700;
  margin-bottom: 3px;
}

/* Espaco para a navegacao inferior fixa */
#main {
  padding-bottom: max(110px, calc(90px + env(safe-area-inset-bottom)));
}


/* PAISUME v1.3.1 - identidade institucional do rodape */

.site-credit-label {
  margin-bottom: 5px;
}

.site-credit-brand {
  display: block;
  width: 180px;
  margin: 0 auto;
  line-height: 0;
}

.site-credit-brand img {
  display: block;
  width: 100%;
  height: auto;
}

.site-credit-institution {
  margin-top: 4px;
}

@media (max-width: 600px) {
  .site-credit-brand {
    width: 160px;
  }
}
