/*
 * Estilos para Casa Makai Booking (v2.0)
 * Paleta:
 * #FAF6F2 (Fondo claro)
 * #40597A (Azul medio / Primario)
 * #1F2A44 (Azul oscuro / Texto)
 */

.cmk-booking-wrapper {
  background-color: #FAF6F2;
  color: #1F2A44;
  border: 1px solid #EAE1D9;
  border-radius: 16px;
  padding: 2.5rem;
  max-width: 500px; /* Un poco más ancho para los nuevos campos */
  margin: 40px auto;
  font-family: -apple-system, BlinkMacSystemSystemFont, "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.1);
}

.cmk-booking-wrapper h2 {
  color: #40597A;
  text-align: center;
  margin-top: 0;
  margin-bottom: 1.5rem;
  font-size: 1.75rem;
  font-weight: 600;
}

/* --- NUEVO: Sistema de Grid para el formulario --- */
.cmk-form-row {
  display: flex;
  margin-left: -8px;
  margin-right: -8px;
  width: calc(100% + 16px);
}
.cmk-field-group {
  margin-bottom: 1.25rem;
  padding-left: 8px;
  padding-right: 8px;
  box-sizing: border-box;
  width: 100%;
}
.cmk-col-4 { width: 33.33%; }
.cmk-col-6 { width: 50%; }
.cmk-col-8 { width: 66.66%; }
/* --- Fin Grid --- */

.cmk-field-group label {
  display: block;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: #40597A;
}

.cmk-field-group input[type="email"],
.cmk-field-group input[type="text"],
.cmk-field-group input[type="tel"],
.cmk-field-group select {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid #D0D5DB;
  border-radius: 8px;
  box-sizing: border-box; 
  font-size: 1rem;
  background: #FFFFFF;
  color: #1F2A44;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}
.cmk-field-group select {
  background: #FFFFFF url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="%2340597A" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="6 9 12 15 18 9"></polyline></svg>') no-repeat right 0.75rem center;
  background-size: 20px;
  padding-right: 2.5rem; /* Espacio para la flecha */
  cursor: pointer;
}


.cmk-field-group input[type="text"]:focus,
.cmk-field-group input[type="email"]:focus,
.cmk-field-group input[type="tel"]:focus,
.cmk-field-group select:focus {
  outline: none;
  border-color: #40597A;
  box-shadow: 0 0 0 2px rgba(64, 89, 122, 0.2);
}

/* --- NUEVO: Instrucciones de usuario --- */
.cmk-instructions {
  font-size: 0.875rem;
  color: #40597A;
  margin: -10px 0 10px;
  padding: 0;
  text-align: center;
}

#cmk-datepicker {
  background: #FFFFFF url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="%2340597A" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="4" width="18" height="18" rx="2" ry="2"></rect><line x1="16" y1="2" x2="16" y2="6"></line><line x1="8" y1="2" x2="8" y2="6"></line><line x1="3" y1="10" x2="21" y2="10"></line></svg>') no-repeat right 1rem center;
  background-size: 20px;
  cursor: pointer;
}

.cmk-price-summary {
  background-color: #FFFFFF;
  border: 2px solid #EAE1D9;
  border-radius: 8px;
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
}
.cmk-price-summary h3 {
  color: #40597A;
  margin-top: 0;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #EAE1D9;
  font-size: 1.1rem;
}
.cmk-price-summary p {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0.5rem 0;
  color: #1F2A44;
}
.cmk-price-summary p strong {
  color: #1F2A44;
  font-size: 1.1rem;
}
.cmk-price-summary p span {
  font-weight: 600;
}

/* --- NUEVO: Mensaje de error de noches --- */
.cmk-nights-error {
  color: #D9534F; /* Rojo de error */
  font-weight: 600;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed #D9534F;
  text-align: center;
  justify-content: center !important;
}

.cmk-submit-button {
  background-color: #40597A;
  color: #FFFFFF;
  border: none;
  border-radius: 8px;
  padding: 1rem;
  width: 100%;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease;
}
.cmk-submit-button:disabled {
  background-color: #9ca3af;
  cursor: not-allowed;
  transform: none;
}
.cmk-submit-button:not(:disabled):hover {
  background-color: #1F2A44;
  transform: translateY(-2px);
}

.cmk-stripe-badge {
  text-align: center;
  font-size: 0.85rem;
  color: #6b7280;
  margin-top: 1rem;
}
.cmk-stripe-badge small {
    display: block;
    margin-top: 4px;
}

/* Responsivo */
@media (max-width: 500px) {
  .cmk-booking-wrapper {
    padding: 1.5rem;
    margin: 20px 10px;
  }
  .cmk-form-row {
    flex-direction: column;
    margin-left: 0;
    margin-right: 0;
    width: 100%;
  }
  .cmk-field-group {
    padding-left: 0;
    padding-right: 0;
  }
  .cmk-col-4, .cmk-col-6, .cmk-col-8 {
    width: 100%;
  }
}