#sbw-booking-widget {
  position: relative;
  width: 100%;
  max-width: 700px; /* optional, for nice scaling */
  aspect-ratio: 16 / 9;
  background-color: white;
  border: 2px solid #e91e63; /* Pink */
  border-radius: 15px;
  margin: 0 auto;
  padding: 1rem;
  box-sizing: border-box;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

#sbw-calendar h3 {
  text-align: center;
  color: #e91e63;
  margin-bottom: 1rem;
}

.sbw-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
}

.sbw-day {
  padding: 10px;
  text-align: center;
  border-radius: 8px;
  font-weight: bold;
}

.sbw-day-name {
  padding: 10px;
  text-align: center;
  border-radius: 8px 8px 0 0;  /* Top corners rounded only */
  font-weight: bold;
  background-color: white;
  color: #e91e63; /* your pink color */
  border-bottom: 2px solid #e91e63; /* pink underline */
}

.sbw-day {
  background-color: white;
  color: #e91e63;
  cursor: pointer;
  transition: background 0.2s;
}

.sbw-day:hover {
  background-color: #ffe4ec;
}

.sbw-day.empty {
  background: none;
  cursor: default;
}

.sbw-time-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 10px;
  margin-top: 1rem;
}

.sbw-time-slot {
  background-color: #ffe4ec;
  color: #e91e63;
  padding: 10px;
  text-align: center;
  border-radius: 10px;
  cursor: pointer;
  font-weight: bold;
  transition: background 0.2s;
}

.sbw-time-slot:hover {
  background-color: #fdd0dc;
}

#sbw-back-to-calendar {
  background: none;
  border: none;
  color: #e91e63;
  font-weight: bold;
  margin-bottom: 10px;
  cursor: pointer;
}

.sbw-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.sbw-form-row {
  display: contents; /* allow full control from .sbw-form-grid */
}

.sbw-form-full {
  grid-column: span 2;
}



#sbw-prev-month,
#sbw-next-month {
  background-color: #e91e63;
  color: white;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  font-size: 1.2rem;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  padding: 0;
  transition: all 0.3s ease;
  line-height: 1;
  position: relative;
  top: -1px; /* Adjust vertical alignment */
}

#sbw-prev-month:hover,
#sbw-next-month:hover {
  background-color: white;
  color: #e91e63;
  border: 2px solid #e91e63;
}


#sbw-time-selection {
  padding-left: 1rem;
  padding-right: 1rem;
}


#sbw-booking-widget button.sbw-back-button {
  all: unset; /* elimina cualquier estilo heredado */
  display: inline-block;
  color: #e91e63;
  font-weight: bold;
  font-size: 1rem;
  cursor: pointer;
  padding: 8px 12px;
  transition: all 0.2s ease-in-out;
}

#sbw-booking-widget button.sbw-back-button:hover {
  text-decoration: underline;
}




/* Custom select appearance */
.sbw-select {
  flex: 1;
  padding: 0.5rem;
  border-radius: 12px;
  border: 2px solid #e91e63;
  background-color: white;
  color: black;
  font-size: 1rem;
  cursor: pointer;
  appearance: none; /* removes native arrow in some browsers */
  background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20fill%3D%22%23e91e63%22%20height%3D%2220%22%20viewBox%3D%220%200%2024%2024%22%20width%3D%2220%22%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%3E%3Cpath%20d%3D%22M7%2010l5%205%205-5z%22/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 1rem;
}

/* Remove blue background when hovering an option */
.sbw-select option:hover,
.sbw-select option:focus,
.sbw-select option:checked {
  background-color: #e91e63;
  color: white;
}


/* Style for text inputs to match the select dropdown */
.sbw-form-row input[type="text"],
.sbw-form-row input[type="tel"] {
  flex: 1;
  padding: 0.5rem;
  border-radius: 12px;
  border: 2px solid #e91e63;
  background-color: white;
  color: black;
  font-size: 1rem;
  appearance: none;
  outline: none;
  transition: border-color 0.3s ease;
}

.sbw-form-row input[type="text"]:focus,
.sbw-form-row input[type="tel"]:focus {
  border-color: #c2185b;
}



/* Verification input styling */
.sbw-code-input {
  max-width: 300px !important; 
  width: 100% !important;
  padding: 10px !important;
  border-radius: 12px !important;
  border: 2px solid #e91e63 !important;
  background-color: white !important;
  color: black !important;
  font-size: 1rem !important;
  box-sizing: border-box !important;
}









.sbw-button-row {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

.sbw-button {
  padding: 12px 20px;
  background-color: white;
  color: black;
  border: 2px solid #e91e63;
  border-radius: 10px;
  cursor: pointer;
  transition: background-color 0.3s, color 0.3s;
}

.sbw-button:hover {
  background-color: #e91e63;
  color: white;
}


.sbw-button-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.sbw-pay-container {
  position: relative;
  flex: 1;
  max-width: 100%;
}

#sbw-pay-now {
  width: 100%;
  padding: 18px 28px;
  font-size: 19px;
  border-radius: 12px;
  border: 2px solid #ff5ca2;
  background-color: white;
  color: black;
  position: relative;
  z-index: 2;
}

.sbw-tag {
  background-color: #ffe4ec;
  padding: 16px 20px;
  font-size: 16px;
  font-weight: 500;
  border-radius: 0 0 12px 12px;
  margin-top: -8px;
  z-index: 1;
  position: relative;
  line-height: 1.5;
}

#sbw-confirm-no-pay {
  padding: 16px 20px; /* reduced horizontal padding */
  font-size: 16px;
  border-radius: 12px;
  border: 2px solid #ff5ca2;
  background-color: white;
  color: black;
  cursor: pointer;
  transition: background-color 0.3s, color 0.3s;
  align-self: center; /* centers vertically relative to Pagar Ahora */
  height: 58px; /* explicitly match the height of the pay button (without tag) */
}



#sbw-pay-now:hover {
  background-color: #ff5ca2;
  color: white;
}


#sbw-confirm-no-pay:hover {
  background-color: #ff5ca2;
  color: white;
}


.sbw-form-row-input {
  padding: 0.5rem;
  border-radius: 12px;
  border: 2px solid #e91e63;
  background-color: white;
  color: black;
  font-size: 1rem;
  appearance: none;
  outline: none;
  transition: border-color 0.3s ease;
}

.sbw-form-row-input:focus {
  border-color: #c2185b;
}






/* Shared input styles */
.sbw-phone-prefix input,
.sbw-phone-main input {
  width: 100%;
  padding: 0.5rem;
  border-radius: 12px;
  border: 2px solid #e91e63;
  background-color: white;
  color: black;
  font-size: 1rem;
  appearance: none;
  outline: none;
  transition: border-color 0.3s ease;
}

.sbw-phone-prefix input:focus,
.sbw-phone-main input:focus {
  border-color: #c2185b;
}


/* Phone row inside form */
.sbw-phone-row {
  grid-column: span 2; /* Ensures it aligns with other full-width rows */
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Inner flex container */
.sbw-phone-inputs {
  display: flex;
  width: 100%;
  gap: 8px;
}

/* Prefix box: 1/5 of input area */
.sbw-phone-prefix {
  flex: 0 0 20%;
  max-width: 20%;
  text-align: center;
}

/* Phone number box: 4/5 of input area */
.sbw-phone-main {
  flex: 0 0 80%;
  max-width: 80%;
}

/* Inputs inside phone row */
.sbw-phone-prefix input,
.sbw-phone-main input {
  width: 100%;
  padding: 0.5rem;
  border-radius: 12px;
  border: 2px solid #e91e63;
  background-color: white;
  color: black;
  font-size: 1rem;
  appearance: none;
  outline: none;
  transition: border-color 0.3s ease;
}

.sbw-phone-prefix input:focus,
.sbw-phone-main input:focus {
  border-color: #c2185b;
}

.sbw-form-actions button {
  padding: 0.6rem 1.2rem;
  border: 2px solid #e91e63;
  background-color: white;
  color: black;
  border-radius: 12px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
}

.sbw-form-actions button:hover {
  background-color: #e91e63;
  color: white;
}

.sbw-form-actions {
  display: flex;
  justify-content: flex-end; /* aligns the button to the right */
  margin-top: 1.5rem;
}

.sbw-form-actions button {
  width: auto; /* make button size depend on content */
  padding: 10px 20px; /* optional: reduce horizontal space */
  max-width: 200px; /* optional: limit size if needed */
}

.sbw-day.disabled,
.sbw-time-slot.disabled {
  background-color: #ddd;
  color: #777;
  text-decoration: line-through;
  pointer-events: none;
  cursor: not-allowed;
}


@keyframes fadeInOut {
  0% { opacity: 0; transform: translateY(-5px); }
  10% { opacity: 1; transform: translateY(0); }
  90% { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(-5px); }
}

.sbw-code-row {
  display: flex;
  gap: 12px;
  margin-top: 1rem;
  align-items: center;
}

.sbw-code-input {
  flex: 1 !important;
  padding: 10px !important;
  border-radius: 12px !important;
  border: 2px solid #e91e63 !important;
  background-color: white !important;
  color: black !important;
  font-size: 1rem !important;
  box-sizing: border-box !important;
}

.sbw-code-button {
  white-space: nowrap;
  padding: 10px 16px;
  font-size: 1rem;
  border-radius: 12px;
  border: 2px solid #e91e63;
  background-color: white;
  color: black;
  cursor: pointer;
  transition: background-color 0.3s, color 0.3s;
}

.sbw-code-button:hover {
  background-color: #e91e63;
  color: white;
}

/* ----------- Ajustes responsive ----------- */
@media (max-width: 600px) {

  /* La cuadrícula de 2 columnas pasa a 1 columna */
  .sbw-form-grid {
    grid-template-columns: 1fr;
  }

  /* Inputs y selects ocupan todo el ancho */
  .sbw-form-row input[type="text"],
  .sbw-form-row input[type="tel"],
  .sbw-select {
    width: 100%;
    max-width: 100%;
  }



  /* Botón se queda pequeño pero centrado */
  .sbw-form-actions {
    justify-content: center;
  }
  .sbw-form-actions button {
    width: auto;
    max-width: 200px; /* sigue siendo pequeño */
  }
@media (max-width: 600px) {
  .sbw-phone-inputs {
    flex-direction: row;  /* siempre en fila */
    gap: 8px;
  }
  .sbw-phone-prefix {
    flex: 0 0 30%;  /* prefijo más estrecho */
    max-width: 30%;
  }
  .sbw-phone-main {
    flex: 1;        /* número ocupa el resto */
  }
}


/* Mantener prefijo + teléfono en la misma fila */
.sbw-phone-row {
  grid-column: span 2;
  display: flex;
  flex-direction: row;  /* en fila */
  gap: 8px;             /* espacio entre prefijo y número */
}

/* Asegurar márgenes laterales en todos los inputs */
.sbw-form-row input[type="text"],
.sbw-form-row input[type="tel"],
.sbw-form-row-input,
.sbw-phone-prefix input,
.sbw-phone-main input {
  box-sizing: border-box;
  width: 100%;
  margin-right: 0;   /* evita que sobresalga */
}

/* Alinear bien con el select (que ya respeta margen derecho) */
.sbw-form-grid {
  gap: 16px;          /* mantiene separación uniforme */
  padding-right: 4px; /* fuerza un pequeño margen interno a la derecha */
}