/* Sierra Nevada Reservations - Frontend */
/* Diseño moderno estilo reservas de forfait - Colores celestes */

:root {
  --snr-primary: #0891b2;
  /* Celeste principal */
  --snr-primary-light: #22d3ee;
  /* Celeste claro */
  --snr-primary-dark: #0e7490;
  /* Celeste oscuro */
  --snr-accent: #06b6d4;
  /* Cyan */
}

.snr-fields {
  margin: 20px 0;
  padding: 0;
  border: none;
  font-family: inherit;
}

.snr-fields-title {
  font-size: 1rem;
  font-weight: 600;
  color: #333;
  margin-bottom: 16px;
  display: none;
}

/* Layout horizontal para fecha y días */
.snr-date-days-row {
  display: flex;
  gap: 20px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.snr-date-days-row .snr-field-group {
  flex: 1;
  min-width: 140px;
}

.snr-field-group label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: #555;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.snr-field-group input[type="date"],
.snr-field-group input[type="number"] {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 0.95rem;
  background: #fff;
  color: #333;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.snr-field-group input[type="date"]:focus,
.snr-field-group input[type="number"]:focus {
  outline: none;
  border-color: var(--snr-primary);
  box-shadow: 0 0 0 3px rgba(8, 145, 178, 0.15);
}

/* Beneficiarios - Categorías con contadores */
.snr-beneficiaries-section {
  margin-bottom: 24px;
}

.snr-beneficiaries-title {
  font-size: 0.75rem;
  font-weight: 600;
  color: #555;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.snr-beneficiary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: #f8f9fa;
  border-radius: 8px;
  margin-bottom: 8px;
  transition: background 0.2s ease;
}

.snr-beneficiary-row:hover {
  background: #f0f1f2;
}

.snr-beneficiary-info {
  display: flex;
  flex-direction: column;
}

.snr-beneficiary-name {
  font-size: 0.95rem;
  font-weight: 500;
  color: #333;
}

.snr-beneficiary-age {
  font-size: 0.8rem;
  color: #888;
  margin-top: 2px;
}

.snr-beneficiary-counter {
  display: flex;
  align-items: center;
  gap: 8px;
}

.snr-counter-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid var(--snr-primary);
  background: transparent;
  color: var(--snr-primary);
  font-size: 1.2rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  line-height: 1;
  padding: 0;
}

.snr-counter-btn:hover {
  background: var(--snr-primary);
  color: #fff;
}

.snr-counter-btn:disabled {
  border-color: #ccc;
  color: #ccc;
  cursor: not-allowed;
}

.snr-counter-btn:disabled:hover {
  background: transparent;
  color: #ccc;
}

.snr-counter-value {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--snr-primary);
  min-width: 24px;
  text-align: center;
}

/* Precio dinámico */
.snr-price-section {
  margin: 24px 0;
  padding: 16px 0;
  border-top: 1px solid #eee;
}

.snr-price-display {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.snr-price-amount {
  font-size: 2rem;
  font-weight: 700;
  color: var(--snr-primary-dark);
}

.snr-price-suffix {
  font-size: 0.9rem;
  color: #888;
}

.snr-price-loading {
  font-size: 0.9rem;
  color: var(--snr-primary);
  font-style: italic;
}

.snr-price-error {
  font-size: 0.85rem;
  color: #dc3545;
}

/* Beneficiario tipo dropdown (fallback) */
.snr-beneficiary-select-wrapper {
  margin-bottom: 24px;
}

.snr-beneficiary-select-wrapper select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 0.95rem;
  background: #fff;
  color: #333;
  cursor: pointer;
  transition: border-color 0.2s ease;
}

.snr-beneficiary-select-wrapper select:focus {
  outline: none;
  border-color: var(--snr-primary);
  box-shadow: 0 0 0 3px rgba(8, 145, 178, 0.15);
}

/* Ver más tipos */
.snr-show-more {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--snr-primary);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  background: none;
  border: none;
  padding: 8px 0;
  margin-top: 4px;
}

.snr-show-more:hover {
  color: var(--snr-primary-dark);
  text-decoration: underline;
}

.snr-show-more .arrow {
  transition: transform 0.2s ease;
}

.snr-show-more.expanded .arrow {
  transform: rotate(180deg);
}

/* Hidden input for beneficiaries data */
.snr-beneficiaries-data {
  display: none;
}

/* Error state */
.snr-error {
  padding: 12px 16px;
  border: 1px solid #dc3545;
  background: #fff5f5;
  border-radius: 8px;
  color: #dc3545;
  font-size: 0.9rem;
}

/* Spinner */
.snr-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid var(--snr-primary);
  border-radius: 50%;
  border-top-color: transparent;
  animation: snr-spin 0.8s linear infinite;
  margin-right: 8px;
  vertical-align: middle;
}

@keyframes snr-spin {
  to {
    transform: rotate(360deg);
  }
}

/* Responsive */
@media (max-width: 480px) {
  .snr-date-days-row {
    flex-direction: column;
    gap: 16px;
  }

  .snr-beneficiary-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .snr-beneficiary-counter {
    align-self: flex-end;
  }
}