
* {
  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: #8b2635;
  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: #8b2635;
  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: #8b2635;
  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 #8b2635;
}

.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: #8b2635;
  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: #8b2635;
  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: #8b2635;
}

.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: #8b2635;
  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: #8b2635;
  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: #8b2635;
  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: #8b2635;
  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 ===== */
