/* ==========================================================================
   Papelaria Karinhosa — Design System Totem / Pesquisa PDV
   Compatibilidade Estrita: Safari iOS 9.3.5+, Android, WebKit Moderno
   Zero @layer, Zero CSS Variables, Zero Flexbox gap, 100% Identidade Visual
   ========================================================================== */

/* ── Reset & Base ────────────────────────────────────────────────────────── */
* {
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  height: 100%;
  min-height: 100%;
  background-color: #F8F5F2;
  color: #231E1F;
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

/* ── Tipografia ─────────────────────────────────────────────────────────── */
.font-display {
  font-family: 'Barlow Semi Condensed', 'Outfit', -apple-system, Helvetica Neue, sans-serif;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -0.02em;
}

.font-sans {
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* ── Cores e Superfícies Karinhosa ───────────────────────────────────────── */
.bg-surface-base { background-color: #F8F5F2; }
.bg-surface-card { background-color: #FFFFFF; }
.bg-surface-soft { background-color: #FAF7F2; }
.bg-surface-muted { background-color: #F0EEEC; }

.bg-action-primary {
  background-color: #F58223;
  color: #FFFFFF;
}
.bg-action-primary:hover {
  background-color: #D96E14;
}

.text-action-primary { color: #F58223; }
.text-neutral-900 { color: #231E1F; }
.text-neutral-600 { color: #57544F; }
.text-neutral-500 { color: #76736F; }
.text-neutral-400 { color: #9E9B98; }
.text-white { color: #FFFFFF; }
.text-success { color: #16A34A; }
.text-warning { color: #D97706; }

/* ── Badges ─────────────────────────────────────────────────────────────── */
.badge-warning {
  background-color: #FEF3C7;
  color: #231E1F;
  border: 2px solid #231E1F;
  box-shadow: 2px 2px 0 #231E1F;
  -webkit-box-shadow: 2px 2px 0 #231E1F;
  display: inline-block;
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-orange {
  background-color: #FEE8D3;
  color: #231E1F;
  border: 2px solid #231E1F;
  box-shadow: 2px 2px 0 #231E1F;
  -webkit-box-shadow: 2px 2px 0 #231E1F;
  display: inline-block;
  padding: 4px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-white {
  background-color: #FFFFFF;
  color: #231E1F;
  border: 2px solid #231E1F;
  box-shadow: 2px 2px 0 #231E1F;
  -webkit-box-shadow: 2px 2px 0 #231E1F;
  display: inline-block;
  padding: 4px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ── Neobrutalist Cards & Shadows ────────────────────────────────────────── */
.card-neobrutal {
  background-color: #FFFFFF;
  border: 2px solid #231E1F;
  border-radius: 16px;
  box-shadow: 4px 4px 0 #231E1F;
  -webkit-box-shadow: 4px 4px 0 #231E1F;
  padding: 28px;
}

/* ── Botões Interativos (Pressable) ─────────────────────────────────────── */
.pressable {
  display: inline-block;
  background-color: #FFFFFF;
  border: 2px solid #231E1F;
  border-radius: 12px;
  box-shadow: 3px 3px 0 #231E1F;
  -webkit-box-shadow: 3px 3px 0 #231E1F;
  cursor: pointer;
  outline: none;
  text-align: center;
  text-decoration: none;
  color: #231E1F;
  font-family: 'Outfit', sans-serif;
  transition: all 0.08s ease;
  -webkit-transition: all 0.08s ease;
}

.pressable:hover {
  background-color: #FAF7F2;
}

.pressable:active {
  transform: translate(2px, 2px);
  -webkit-transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 #231E1F;
  -webkit-box-shadow: 1px 1px 0 #231E1F;
}

.pressable-lg {
  display: inline-block;
  background-color: #F58223;
  color: #FFFFFF;
  border: 2px solid #231E1F;
  border-radius: 14px;
  box-shadow: 4px 4px 0 #231E1F;
  -webkit-box-shadow: 4px 4px 0 #231E1F;
  cursor: pointer;
  outline: none;
  font-family: 'Barlow Semi Condensed', sans-serif;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  transition: all 0.08s ease;
  -webkit-transition: all 0.08s ease;
}

.pressable-lg:hover {
  background-color: #D96E14;
}

.pressable-lg:active {
  transform: translate(2px, 2px);
  -webkit-transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 #231E1F;
  -webkit-box-shadow: 2px 2px 0 #231E1F;
}

/* ── Opções Selecionadas (Check / Active) ─────────────────────────────────── */
.pressable.is-selected {
  background-color: #FEE8D3 !important;
  border-color: #231E1F !important;
  box-shadow: 3px 3px 0 #F58223 !important;
  -webkit-box-shadow: 3px 3px 0 #F58223 !important;
}

.pressable.is-selected .item-icon {
  background-color: #F58223 !important;
  color: #FFFFFF !important;
}

/* ── Header do Totem ────────────────────────────────────────────────────── */
.totem-header {
  position: relative;
  width: 100%;
  background-color: #FFFFFF;
  border-bottom: 2px solid #231E1F;
  padding: 12px 20px;
  box-shadow: 0 2px 0 #231E1F;
  -webkit-box-shadow: 0 2px 0 #231E1F;
  z-index: 20;
}

.header-inner {
  max-width: 900px;
  margin: 0 auto;
  display: table;
  width: 100%;
}

.header-left {
  display: table-cell;
  vertical-align: middle;
  text-align: left;
}

.header-center {
  display: table-cell;
  vertical-align: middle;
  text-align: center;
}

.header-right {
  display: table-cell;
  vertical-align: middle;
  text-align: right;
}

.header-logo-box {
  display: inline-block;
  vertical-align: middle;
  background-color: #FFFFFF;
  border: 2px solid #231E1F;
  border-radius: 8px;
  padding: 4px 8px;
  box-shadow: 2px 2px 0 #231E1F;
  -webkit-box-shadow: 2px 2px 0 #231E1F;
  margin-right: 10px;
}

.header-logo-img {
  height: 28px;
  vertical-align: middle;
}

.header-title {
  display: inline-block;
  vertical-align: middle;
  font-family: 'Barlow Semi Condensed', sans-serif;
  font-weight: 800;
  font-size: 18px;
  text-transform: uppercase;
  color: #231E1F;
}

.progress-track {
  width: 160px;
  height: 8px;
  background-color: #F0EEEC;
  border: 1.5px solid #231E1F;
  border-radius: 99px;
  overflow: hidden;
  display: inline-block;
  vertical-align: middle;
  margin: 0 8px;
}

.progress-fill {
  height: 100%;
  background-color: #F58223;
  width: 0%;
  transition: width 0.25s ease;
  -webkit-transition: width 0.25s ease;
}

.btn-restart {
  background-color: #F0EEEC;
  border: 1.5px solid #231E1F;
  border-radius: 8px;
  padding: 6px 12px;
  font-family: 'Barlow Semi Condensed', sans-serif;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 2px 2px 0 #231E1F;
  -webkit-box-shadow: 2px 2px 0 #231E1F;
}
.btn-restart:active {
  transform: translate(1px, 1px);
  -webkit-transform: translate(1px, 1px);
  box-shadow: 1px 1px 0 #231E1F;
  -webkit-box-shadow: 1px 1px 0 #231E1F;
}

/* ── Layout Geral dos Passos ─────────────────────────────────────────────── */
.step-container {
  max-width: 840px;
  margin: 0 auto;
  padding: 24px 16px 40px 16px;
  min-height: calc(100vh - 70px);
}

.step-header {
  text-align: center;
  margin-bottom: 24px;
}

.step-title {
  font-family: 'Barlow Semi Condensed', sans-serif;
  font-weight: 900;
  font-size: 32px;
  text-transform: uppercase;
  color: #231E1F;
  margin-top: 10px;
  line-height: 1.15;
}

.step-desc {
  font-size: 16px;
  color: #57544F;
  margin-top: 6px;
  font-weight: 500;
}

/* ── Grid de Opções (Compatível Safari 9 sem gap) ────────────────────────── */
.options-grid {
  margin-left: -8px;
  margin-right: -8px;
}

.options-col-2 {
  float: left;
  width: 50%;
  padding: 8px;
}

.options-col-3 {
  float: left;
  width: 33.333%;
  padding: 8px;
}

.options-col-full {
  width: 100%;
  padding: 8px;
}

.clearfix:after {
  content: "";
  display: table;
  clear: both;
}

/* ── Cards de Atendentes ─────────────────────────────────────────────────── */
.attendant-card {
  width: 100%;
  padding: 16px;
  text-align: center;
  border-radius: 16px;
}

.attendant-photo {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  border: 3px solid #231E1F;
  object-fit: cover;
  -webkit-border-radius: 50%;
  box-shadow: 3px 3px 0 #231E1F;
  -webkit-box-shadow: 3px 3px 0 #231E1F;
  margin: 0 auto 12px auto;
  display: block;
}

.attendant-name {
  font-family: 'Barlow Semi Condensed', sans-serif;
  font-weight: 800;
  font-size: 24px;
  text-transform: uppercase;
  color: #231E1F;
  display: block;
}

.attendant-badge {
  font-size: 12px;
  color: #76736F;
  font-weight: 600;
  margin-top: 2px;
}

/* ── 5 Estrelas Grandes ─────────────────────────────────────────────────── */
.stars-container {
  text-align: center;
  margin: 24px 0;
}

.star-btn {
  display: inline-block;
  padding: 14px 18px;
  margin: 0 6px;
  border-radius: 14px;
  font-size: 38px;
  line-height: 1;
  background-color: #FFFFFF;
  border: 2px solid #231E1F;
  box-shadow: 3px 3px 0 #231E1F;
  -webkit-box-shadow: 3px 3px 0 #231E1F;
  cursor: pointer;
  transition: all 0.1s ease;
  -webkit-transition: all 0.1s ease;
}

.star-btn.is-active {
  background-color: #FEF3C7;
  transform: scale(1.06);
  -webkit-transform: scale(1.06);
  color: #D97706;
}

/* ── Inputs e Buscas ─────────────────────────────────────────────────────── */
.input-neobrutal {
  width: 100%;
  padding: 14px 18px;
  font-size: 16px;
  font-family: 'Outfit', sans-serif;
  color: #231E1F;
  background-color: #FFFFFF;
  border: 2px solid #231E1F;
  border-radius: 10px;
  outline: none;
  box-shadow: 2px 2px 0 #231E1F;
  -webkit-box-shadow: 2px 2px 0 #231E1F;
}

.input-neobrutal:focus {
  border-color: #F58223;
  box-shadow: 3px 3px 0 #F58223;
  -webkit-box-shadow: 3px 3px 0 #F58223;
}

/* ── Barra de Navegação Inferior ─────────────────────────────────────────── */
.step-actions {
  margin-top: 28px;
  text-align: right;
  display: block;
}

.btn-secondary {
  display: inline-block;
  background-color: #FFFFFF;
  color: #57544F;
  border: 2px solid #231E1F;
  border-radius: 10px;
  padding: 12px 24px;
  font-family: 'Barlow Semi Condensed', sans-serif;
  font-size: 16px;
  font-weight: 700;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 2px 2px 0 #231E1F;
  -webkit-box-shadow: 2px 2px 0 #231E1F;
  margin-right: 12px;
}
.btn-secondary:active {
  transform: translate(1px, 1px);
  -webkit-transform: translate(1px, 1px);
}

.btn-primary {
  display: inline-block;
  background-color: #F58223;
  color: #FFFFFF;
  border: 2px solid #231E1F;
  border-radius: 10px;
  padding: 12px 28px;
  font-family: 'Barlow Semi Condensed', sans-serif;
  font-size: 18px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  cursor: pointer;
  box-shadow: 3px 3px 0 #231E1F;
  -webkit-box-shadow: 3px 3px 0 #231E1F;
}
.btn-primary:active {
  transform: translate(2px, 2px);
  -webkit-transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 #231E1F;
  -webkit-box-shadow: 1px 1px 0 #231E1F;
}

/* ── Tela de Boas-Vindas ─────────────────────────────────────────────────── */
.welcome-box {
  max-width: 680px;
  margin: 30px auto;
  text-align: center;
  padding: 40px 30px;
}

.welcome-logo-frame {
  display: inline-block;
  background-color: #FFFFFF;
  border: 2px solid #231E1F;
  border-radius: 16px;
  padding: 18px 24px;
  box-shadow: 3px 3px 0 #231E1F;
  -webkit-box-shadow: 3px 3px 0 #231E1F;
  margin-bottom: 24px;
}

.welcome-logo-img {
  height: 75px;
  display: block;
}

.welcome-title {
  font-family: 'Barlow Semi Condensed', sans-serif;
  font-weight: 900;
  font-size: 44px;
  text-transform: uppercase;
  line-height: 1.1;
  color: #231E1F;
  margin-bottom: 16px;
}

.welcome-desc {
  font-size: 18px;
  color: #57544F;
  line-height: 1.5;
  margin-bottom: 32px;
}

/* ── Tela de Agradecimento ───────────────────────────────────────────────── */
.thankyou-box {
  max-width: 580px;
  margin: 40px auto;
  text-align: center;
  padding: 40px 24px;
}

.thankyou-icon {
  width: 80px;
  height: 80px;
  line-height: 76px;
  font-size: 40px;
  background-color: #DCFCE7;
  border: 2px solid #231E1F;
  border-radius: 16px;
  margin: 0 auto 20px auto;
  box-shadow: 3px 3px 0 #231E1F;
  -webkit-box-shadow: 3px 3px 0 #231E1F;
}

/* ── Media Queries Tablet (iPad Portrait & Landscape) ────────────────────── */
@media screen and (max-width: 768px) {
  .options-col-2, .options-col-3 {
    width: 100%;
    float: none;
  }
  .step-title {
    font-size: 26px;
  }
  .welcome-title {
    font-size: 32px;
  }
  .star-btn {
    padding: 10px 12px;
    font-size: 30px;
    margin: 0 3px;
  }
}
