@import url("https://fonts.googleapis.com/css2?family=Asap:ital,wght@0,100..900;1,100..900&display=swap");

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  outline: none;
  border: none;
  user-select: none;
  font-family: var(--checkin-font, "Asap"), serif;
  font-optical-sizing: auto;
  user-drag: none;
  -webkit-user-drag: none;
  user-select: none;
}

html,
body {
  overflow: hidden;
}

:root {
  --checkin-bg: #eaeaea;
  --checkin-text: #4a5568;
  --checkin-field: #f8fafc;
  --checkin-accent: #00ae9d;
}

/* Base */
body {
  background: var(--checkin-bg);
  color: var(--checkin-text);
  margin: 0;
  height: 100svh;
  width: 100svw;
  transition: padding 0.3s ease;
}

#stage {
  position: absolute;
  transform-origin: 0 0;
  top: 0;
  left: 0;
  transition: padding 0.3s ease;
}

.horizontal {
  display: flex;
  justify-content: center;
  width: 1920px;
  height: 1080px;
}
.vertical {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 1080px;
  height: 1920px;
}

.teclado-ativo {
  padding-bottom: 150px; /* Padding ao abrir o teclado */
}

#logotipo {
  position: absolute;
  left: 50%;
  top: 50px;
  transform: translateX(-50%);
  width: 100%;
  max-width: 280px;
  margin: 0 auto 50px;
  display: block;
  transition: all 0.3s ease;
}

/* .logo-res {
  max-width: 150px !important;
  top: 20px !important;
  left: 20px !important;
  transform: translateX(0) !important;
} */

/* Tela Inicial */
.initial-screen {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

.initial-screen img {
  width: 500px;
  height: auto;
  margin-bottom: 20px;
}

/* Container do Formulário */
.form-container {
  display: none;
  max-width: 550px;
  width: 100%;
  margin: 20px auto;
  padding: 30px;
  align-items: center;
  justify-content: center;
}
#checkinForm {
  width: 100%;
}
.form-group {
  margin-bottom: 20px;
  position: relative;
}

/* Campos do Formulário */
.fields {
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  gap: 10px;
}

/* Layout Cidade e Estado lado a lado */
.cidade-estado {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 15px;
  align-items: stretch;
}

.campo-cidade,
.campo-estado {
  position: relative;
}

.autocomplete-list {
  position: absolute;
  margin-top: 0;
  padding: 0;
  list-style: none;
  max-height: 220px;
  overflow-y: auto;
  border: 1px solid #ddd;
  background: #fff;
  z-index: 9999;
  font-size: 1.5rem;
  width: 100%;
  border-radius: 0 0 10px 10px;
}
.autocomplete-item {
  padding: 8px 10px;
  cursor: pointer;
}
.autocomplete-item:hover {
  background: #f2f2f2;
}

label {
  display: block;
  color: var(--checkin-text);
  font-weight: bold;
  text-transform: uppercase;
  font-size: 21px;
  position: absolute;
  top: 11px;
  left: 10px;
  padding: 0 5px;
  background: #ffffff00;
  border-radius: 5px;
  transition: all 0.3s ease;
  pointer-events: none;
}

input:focus + label,
input:not(:placeholder-shown) + label,
select:focus + label,
label.label-up {
  background: var(--checkin-field);
  font-size: 18px;
  top: -12px;
  padding: 0 15px;
}

::placeholder {
  color: #a0aec0;
  text-transform: initial !important;
}

input[type="text"],
input[type="email"],
input[type="tel"] {
  width: 100%;
  padding: 12px;
  border-radius: 6px;
  background: var(--checkin-field);
  font-size: 24px;
  box-sizing: border-box;
  text-transform: capitalize;
  height: 50px;
}

/* Remove capitalização do campo email */
input[type="email"] {
  text-transform: none;
}
input[type="text"]:disabled {
  background: #dfdfdf;
}

/* Estilo para o select do estado */
select {
  width: 100%;
  padding: 12px;
  border-radius: 6px;
  background: var(--checkin-field);
  font-size: 24px;
  box-sizing: border-box;
  height: 50px;
  cursor: pointer;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
  background-position: right 12px center;
  background-repeat: no-repeat;
  background-size: 16px;
}

/* Validação de email com erro */
input.error {
  border: 2px solid #f56565 !important;
  background: #fed7d7 !important;
}

input:focus,
select:focus {
  outline: none;
  outline: solid 3px var(--checkin-accent);
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.05);
}

/* Switches Customizados */
.custom-switch {
  position: relative;
  height: 50px;
  background: #f87171;
  border-radius: 25px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 60px;
  overflow: hidden;
  margin-bottom: 5px;
}

.custom-switch.active {
  background: #4ade80;
}

.switch-text {
  color: #333;
  font-weight: 500;
  font-size: 18px;
  z-index: 1;
  transition: all 0.3s ease;
  text-align: center;
  white-space: nowrap;
}

.switch-indicator {
  position: absolute;
  left: 5px;
  width: 40px;
  height: 40px;
  background: #ffffff;
  border-radius: 50%;
  transition: all 0.3s ease;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.custom-switch.active .switch-indicator {
  left: calc(100% - 45px);
}

/* Botões */
.button-group {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

button {
  background: var(--checkin-accent);
  color: #ffffff;
  padding: 14px 28px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  width: 100%;
  font-size: 16px;
  font-weight: bold;
  transition: background 0.3s;
  text-transform: uppercase;
}

button:hover {
  filter: brightness(0.9);
}

.btn-cancel {
  background: #7f7f7f;
}

.btn-cancel:hover {
  background: #4d4d4d;
}

/* Utilitários */
.mt-3 {
  margin-top: 15px;
}

.simple-keyboard {
  position: fixed;
  bottom: -300px;
  left: 0;
  width: 100%;
  padding: 10px;
  background: #f8f9fa;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  opacity: 0;
  transition: all 0.3s ease;
}

.simple-keyboard.show {
  bottom: 0;
  opacity: 1;
}

/* Container das Linhas */
.simple-keyboard .hg-rows {
  max-width: 900px;
  margin: 0 auto;
  gap: 8px;
  display: flex;
  flex-direction: column;
}

/* Linhas do Teclado */
.simple-keyboard .hg-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
}

/* Botões Padrão */
.simple-keyboard .hg-button {
  flex: 1;
  height: 60px;
  font-size: 20px;
  font-weight: 700;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  color: #5a645a;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0; /* Permite que o botão encolha */
  padding: 0 10px;
  text-transform: uppercase;
}

/* Botões Especiais */
.simple-keyboard .hg-button[data-skbtn="{bksp}"] {
  flex: 1.5;
  background: #fed7d7;
  color: #e53e3e;
  font-weight: bold;
}

.simple-keyboard .hg-button[data-skbtn="{space}"] {
  flex: 3;
  background: #e6fffa;
  color: #319795;
}

/* Responsividade */
@media (max-width: 768px) {
  .simple-keyboard .hg-button {
    height: 50px;
    font-size: 18px;
  }

  .simple-keyboard {
    padding: 8px;
  }

  /* Ajusta layout cidade/estado em mobile */
  .cidade-estado {
    grid-template-columns: 100px 1fr;
    gap: 10px;
  }
}

@media (max-width: 480px) {
  .simple-keyboard {
    padding: 5px;
  }

  .simple-keyboard .hg-button {
    height: 45px;
    font-size: 16px;
    padding: 0 5px;
  }

  .simple-keyboard .hg-rows {
    gap: 5px;
  }

  .simple-keyboard .hg-row {
    gap: 5px;
  }
}

.alert {
  padding: 5px 60px 5px 20px;
  height: 60px;
  border-radius: 8px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-width: 300px;
  max-width: 90%;
  z-index: 2000;
  animation: slideDown 0.3s ease-out forwards;
}

.alert-close {
  background-image: url("../img/close_fill.svg?v2");
  background-size: 60%;
  background-repeat: no-repeat;
  background-position: center;
  border: none;
  color: #ffffff;
  cursor: pointer;
  font-size: 20px;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  padding: 0;
  line-height: 1;
}
.alert-close:hover {
  background-image: url("../img/close_fill.svg?v2");
  background-size: 60%;
  background-repeat: no-repeat;
  background-position: center;
}

.alert-success {
  background: #c6f6d5;
  color: #276749;
  border: 1px solid #9ae6b4;
  box-shadow: 0 30px 50px #27674930;
}
.alert-info {
  background: #d7f5fe;
  color: #3689f5;
  border: 1px solid #b2ecfe;
  box-shadow: 0 30px 50px #3689f530;
}
.alert-error {
  background: #fed7d7;
  color: #c53030;
  border: 1px solid #feb2b2;
  box-shadow: 0 30px 50px #c5303030;
}
.alert-success .alert-close {
  background-color: #276749;
}
.alert-info .alert-close {
  background-color: #3689f5;
}
.alert-error .alert-close {
  background-color: #c53030;
}

@keyframes slideDown {
  from {
    transform: translateY(-100px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Estilos atualizados para os botões de opção */
.option-buttons {
  display: flex;
  justify-content: space-between;
  margin-bottom: 15px;
  width: 100%;
}

.option-button {
  flex: 1;
  padding: 12px 10px;
  margin: 0 5px;
  background-color: #f8f8f8;
  color: #555;
  border: 1px solid #ddd;
  border-radius: 4px;
  cursor: pointer;
  text-align: left;
  font-weight: normal;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  box-shadow: none;
}

.option-button:first-child {
  margin-left: 0;
}

.option-button:last-child {
  margin-right: 0;
}

.option-button.active {
  background-color: var(--checkin-accent);
  color: #ffffff;
  border-color: var(--checkin-accent);
  font-weight: bold;
}

/* Estilo para o ícone de checkbox */
.checkbox-icon {
  display: inline-block;
  width: 18px;
  height: 18px;
  margin-right: 10px;
  border: 2px solid var(--checkin-accent);
  border-radius: 3px;
  position: relative;
}

.option-button.active .checkbox-icon {
  border-color: #ffffff;
  background-color: #ffffff;
}

.option-button.active .checkbox-icon:after {
  content: "";
  position: absolute;
  left: 3px;
  top: -1px;
  width: 6px;
  height: 10px;
  border: solid var(--checkin-accent);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.checkbox-field {
  display: flex;
  align-items: center;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 600;
  text-transform: none;
}

.checkbox-label input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: var(--checkin-accent);
}

/* Garantir que os botões de opção sejam diferentes dos botões do formulário */
.button-group button {
  font-weight: bold;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.vertical .initial-screen img {
  scale: 1.5;
}
.vertical #checkinForm {
  scale: 1.8;
}
.vertical #logotipo {
  max-width: 540px;
  top: 110px;
}
.vertical .simple-keyboard .hg-button {
  height: 140px;
  font-size: 35px;
}
.vertical .simple-keyboard .hg-rows {
  max-width: 1050px;
}

/* ===== OVERLAY DE STATUS DO EVENTO ===== */
.event-status-overlay {
  position: fixed;
  inset: 0;
  z-index: 2147483647; /* Máximo possível */
  background: radial-gradient(
    circle at center,
    rgba(15, 23, 42, 0.7) 0%,
    rgba(2, 6, 23, 0.9) 100%
  );
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: none; /* Ativado via JS */
  align-items: center;
  justify-content: center;
  padding: 30px;
}

.status-card {
  background: white;
  border-radius: 40px;
  padding: 50px 40px;
  max-width: 450px;
  width: 100%;
  text-align: center;
  box-shadow:
    0 40px 100px -20px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.1) inset;
  border: 1px solid rgba(226, 232, 240, 0.5);
  animation: modalScaleIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  overflow: hidden;
}

@keyframes modalScaleIn {
  from {
    opacity: 0;
    transform: scale(0.8) translateY(30px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.status-icon {
  width: 100px;
  height: 100px;
  background: #f1f5f9;
  border-radius: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 50px;
  margin: 0 auto 30px;
  box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.1);
}

.status-title {
  font-size: 28px;
  font-weight: 900;
  color: #0f172a;
  margin-bottom: 12px;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.status-message {
  font-size: 17px;
  font-weight: 500;
  color: #64748b;
  line-height: 1.6;
}

.status-footer {
  margin-top: 40px;
  padding-top: 30px;
  border-top: 1px solid #f1f5f9;
}

.status-brand-label {
  font-size: 11px;
  font-weight: 800;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  margin-bottom: 6px;
}

.status-brand-name {
  font-size: 16px;
  font-weight: 900;
  color: var(--checkin-accent, #00ae9d);
  text-transform: uppercase;
  letter-spacing: 0.15em;
}
