/* RESET E CONFIGURAÇÕES GLOBAIS */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Inter', sans-serif;
}

html, body {
  height: 100%;
  overflow: hidden !important;
  overscroll-behavior: none !important;
  position: fixed;
  inset: 0;
  -webkit-overflow-scrolling: none !important;
  touch-action: none;
}



body {
  background-color: #1d1d1b; /* fundo da ilha + padding top */
  color: #333;
  margin: 0;
  padding: env(safe-area-inset-top) 0 0 0;
    padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
    overscroll-behavior: none;
  touch-action: none;
}

/* CONTAINER PRINCIPAL */
.page-container {
  height: 100dvh;
  width: 100vw;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  overflow: hidden;
  background-color: #1d1d1b;
  
}

/* TELA DE CARREGAMENTO COMPLETA */
.full-loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: #1d1d1b;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.loading-logo {
  width: 60%;
  max-width: 300px;
  height: auto;
  margin-bottom: 40px;
}

/* Bolinha girando */
.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #f8cb0e;
  border-top: 4px solid transparent;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}



.outer-container {
  flex: 1;
  width: 100%;
  max-width: 500px;
  display: flex;
  flex-direction: column;
  overflow-y: hidden;
  background-color: #fff;
  border-radius: 20px; /* aplica arredondamento total */
  overscroll-behavior: contain;
  box-sizing: border-box;
}





/* HEADER */
.header-container {
  width: 100%;
  background-color: #1d1d1b;
  padding: 50px;
  text-align: center;
  box-shadow: inset 0 -4px 8px rgba(0,0,0,0.3);
  display: flex;
  flex-direction: column;
  align-items: center;
  border-bottom-left-radius: 20px;
  border-bottom-right-radius: 20px;
}


.logo {
  width: 100%;
  max-width: 400px;
  height: auto;
  margin-bottom: 15px;
}

.divider {
  width: 95%;
  height: 3px;
  background-color: #f8cb0e;
  margin: 15px auto;
}

.header-title {
  color: #fff;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0.5px;
}

/* FORMULÁRIO DE CADASTRO */
.content-container {
  padding: 45px;
  text-align: center;
}

.input-field {
  width: 100%;
  padding: 14px;
  font-size: 18px;
  border: 2px solid #ddd;
  border-radius: 12px;
  margin-bottom: 25px;
  box-sizing: border-box;
}

.input-group {
  text-align: left;
  margin-bottom: 25px;
  max-width: 350px;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}

.input-label {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: #1d1d1b;
  margin-bottom: 6px;
}


.input-field:focus {
  border-color: #f8cb0e;
  outline: none;
}

.button {
  background-color: #f8cb0e;
  color: #1d1d1b;
  padding: 16px 32px;
  border-radius: 12px;
  font-size: 18px;
  font-weight: bold;
  width: 100%;
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.3s ease-in-out;
  box-shadow: 0 4px 8px rgba(0,0,0,0.3);
  box-sizing: border-box;
}


.button:hover {
  transform: scale(1.07);
  box-shadow: 0 6px 12px rgba(0,0,0,0.4);
}

/* TELA DE AGENDA */
.agenda-container {
  border-radius: 20px;
  padding: 45px;
  background-color: #fff;
  text-align: left;
}

.instruction {
  font-size: 18px;
  margin-bottom: 20px;
  text-align: center;
}

.day-card {
  background-color: #fff;
  border-radius: 12px;
  padding: 15px;
  margin: 15px 0;
  border: 1px solid #ddd;
  box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

.day-header {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
}

.day-header ion-icon {
  margin-right: 5px;
  font-size: 20px;
  color: #333;
}

.day-header span {
  font-size: 18px;
  font-weight: bold;
  color: #333;
}

.slots-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-start;
}

.slot-card {
  background-color: #f8cb0e;
  border-radius: 12px;
  border: 1px solid #000;
  padding: 10px 12px;
  margin: 5px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: calc(33.33% - 10px);
  min-width: 80px;
  cursor: pointer;
  transition: transform 0.15s ease;
}

.slot-card:hover {
  transform: scale(1.05);
}

.slot-card ion-icon {
  font-size: 18px;
  margin-bottom: 3px;
  color: #1d1d1b;
}

.slot-card span {
  font-size: 16px;
  font-weight: bold;
  color: #1d1d1b;
}

.no-slots {
  text-align: center;
  font-size: 16px;
  margin-top: 10px;
  color: #333;
}

/* MODAL DE CONFIRMAÇÃO */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 100;
}

.modal.active {
  display: flex;
}

.modal-content {
  background: #fff;
  padding: 30px;
  border-radius: 12px;
  max-width: 500px;
  width: 90%;
  text-align: center;
}

.modal-content h2 {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 20px;
  color: #333;
}

.modal-info {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 15px;
}

.modal-info ion-icon {
  font-size: 24px;
  color: #f8cb0e;
  margin-right: 8px;
}

.modal-info span {
  font-size: 20px;
  font-weight: bold;
  color: #333;
}

.modal-text {
  font-size: 16px;
  color: #555;
  margin-bottom: 20px;
}

.modal-buttons {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.modal-button {
  flex: 1;
  padding: 12px 0;
  border-radius: 10px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  border: none;
  transition: transform 0.15s ease;
}

.modal-button.confirm {
  background-color: #f8cb0e;
  color: #1d1d1b;
}

.modal-button.cancel {
  background-color: #1d1d1b;
  color: #fff;
}

.modal-button:hover {
  transform: scale(1.03);
}

/* TELA DE SUCESSO */
.success-container {
  padding: 45px;
  text-align: center;
}

.success-wrapper {
  background-color: #fff;
  border-radius: 12px;
  padding: 20px;
  margin: 20px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.15);
  display: inline-block;
}

.success-wrapper ion-icon {
  font-size: 48px;
  color: #4caf50;
  margin-bottom: 10px;
}

.success-wrapper p {
  font-size: 18px;
  font-weight: bold;
  color: #333;
}

/* LOADING */
.loading {
  text-align: center;
  font-size: 18px;
  margin-top: 20px;
  color: #fff;
}

/* RESPONSIVIDADE */
@media (max-width: 768px) {
  .header-container {
    border-radius: 15px 15px 0 0;
    padding: 40px;
  }

.content-container,
.agenda-container {
  flex: 1;
  overflow-y: auto;
  padding: 24px 20px 32px;
}

  .logo {
    max-width: 280px;
  }

  .header-title {
    font-size: 20px;
  }

  .button {
    font-size: 18px;
    padding: 14px 28px;
  }

  .slot-card {
    width: calc(33.33% - 10px);
  }
}


@media (max-width: 480px) {
  .outer-container {
  flex: 1;
  width: 100%;
  max-width: 500px;
  display: flex;
  flex-direction: column;
  overflow-y: hidden; /* Desativa scroll manual */
  background-color: #fff;
  border-radius: 0px;
  overscroll-behavior: contain;
}


  .header-container {
    border-radius: 0px 1px;
    padding: 32px 20px;
    border-bottom-left-radius: 20px;
    border-bottom-right-radius: 20px;
  }

  .input-field {
    font-size: 16px;
    padding: 12px;
    
  }

  .button {
    padding: 14px 24px;
    font-size: 16px;
  }

  .day-card {
    padding: 10px;
  }

  .slot-card {
    width: calc(33.33% - 10px);
  }
}










@media screen and (min-width: 1024px) {
  html, body {
    overflow-y: auto !important;
    position: relative;
    touch-action: auto;
  }

  .page-container {
    min-height: 100vh;
    width: 100%;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    padding: 60px 0;
    background-color: #111;
    overflow-y: auto;
  }

  .outer-container {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    background-color: white;
    overflow: visible;
  }

  .header-container {
    border-radius: 15px 15px 0 0;
    padding: 60px 40px 40px;
     border-bottom-left-radius: 20px;
  border-bottom-right-radius: 20px;
  }

  .content-container {
    padding: 60px 40px 60px;
    text-align: center;
  }

  .instruction {
    font-size: 20px;
    font-weight: 600;
    color: #444;
    margin-bottom: 40px;
    text-align: center;
  }

  .input-group {
    width: 100%;
    max-width: none; /* REMOVE o limite de 350px */
    text-align: left;
    margin: 0 0 32px 0;
  }

  .input-label {
    font-size: 1rem;
    margin-bottom: 10px;
    color: #1d1d1b;
    font-weight: bold;
  }

  .input-field {
    width: 100%;
    font-size: 18px;
    padding: 16px;
    border-radius: 12px;
    border: 2px solid #ccc;
    box-sizing: border-box;
  }

  .input-field:focus {
    border-color: #f8cb0e;
  }

  .button {
    width: 100%;
    padding: 16px;
    font-size: 18px;
    border-radius: 12px;
    margin-top: 40px;
    background-color: #fbcc0a;
    color: #000;
    font-weight: bold;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.25);
    transition: background 0.3s, transform 0.2s;
    cursor: pointer;
  }

  .button:hover {
    background-color: #e0b700;
    transform: scale(1.03);
  }
}
