/* ═══════════════════════════════════════════
   Camp Booking - Frontend: Calendario
   ═══════════════════════════════════════════ */

#free-camp-booking-wrap {
  margin: 0 0 20px;
  font-family: inherit;
}

/* Toggle familia asociada */
.free-camp-member-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  margin-bottom: 16px;
  background: #fff8e1;
  border: 2px solid #ffca28;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
  user-select: none;
}
.free-camp-member-toggle:hover {
  background: #fff3c4;
}
.free-camp-member-toggle input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: #4caf50;
  cursor: pointer;
  flex-shrink: 0;
  margin: 0;
}
.free-camp-member-toggle-label {
  font-size: 15px;
  font-weight: 600;
  color: #5d4037;
}
/* Estado activo */
.free-camp-member-toggle:has(input:checked) {
  background: #e8f5e9;
  border-color: #4caf50;
}

/* Horario */
#free-camp-schedule {
  padding: 12px 16px;
  background: #f0f7ff;
  border-radius: 8px;
  margin-bottom: 16px;
  font-size: 15px;
  color: #333;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.free-camp-icon {
  font-size: 18px;
  vertical-align: middle;
}
.free-camp-member-badge {
  display: inline-block;
  background: #4caf50;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-left: auto;
}

/* Leyenda */
#free-camp-legend {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  font-size: 13px;
  color: #555;
}
.free-camp-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
}
.free-camp-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
}
.free-camp-dot--available { background: #4caf50; }
.free-camp-dot--selected  { background: #1976d2; }
.free-camp-dot--full      { background: #9e9e9e; }

/* Grid de meses */
.free-camp-months {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-bottom: 20px;
}
.free-camp-month {
  flex: 1 1 260px;
  min-width: 260px;
  max-width: 340px;
}
.free-camp-month-title {
  font-weight: 700;
  font-size: 16px;
  text-align: center;
  margin-bottom: 8px;
  color: #222;
}
.free-camp-month-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

/* Cabecera días */
.free-camp-weekday {
  text-align: center;
  font-weight: 600;
  font-size: 12px;
  color: #888;
  padding: 4px 0;
}

/* Celda día */
.free-camp-day {
  position: relative;
  text-align: center;
  padding: 6px 2px;
  border-radius: 6px;
  font-size: 14px;
  min-height: 44px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}
.free-camp-day--empty    { background: transparent; }
.free-camp-day--inactive { color: #ddd; }
.free-camp-day--available {
  background: #e8f5e9;
  color: #2e7d32;
  cursor: pointer;
  border: 1px solid #c8e6c9;
}
.free-camp-day--available:hover {
  background: #c8e6c9;
  box-shadow: 0 2px 6px rgba(76, 175, 80, 0.25);
}
.free-camp-day--selected {
  background: #1976d2;
  color: #fff;
  cursor: pointer;
  border: 1px solid #1565c0;
}
.free-camp-day--selected:hover { background: #1565c0; }
.free-camp-day--full {
  background: #f5f5f5;
  color: #bbb;
  cursor: not-allowed;
  border: 1px solid #e0e0e0;
}
.free-camp-day-num {
  font-weight: 600;
  line-height: 1.2;
}
.free-camp-day-avail {
  font-size: 10px;
  line-height: 1;
  opacity: 0.8;
}
.free-camp-day--selected .free-camp-day-avail { opacity: 0.7; }

/* Botones semana */
.free-camp-week-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}
.free-camp-week-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 10px 16px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  transition: all 0.2s;
  min-width: 140px;
  text-align: center;
}
.free-camp-week-btn:hover {
  border-color: #1976d2;
  background: #e3f2fd;
}
.free-camp-week-btn--selected {
  border-color: #1976d2;
  background: #1976d2;
  color: #fff;
}
.free-camp-week-btn--selected:hover {
  background: #1565c0;
  border-color: #1565c0;
}
.free-camp-week-btn--disabled {
  opacity: 0.45;
  cursor: not-allowed;
  border-color: #e0e0e0;
}
.free-camp-week-btn--disabled:hover {
  border-color: #e0e0e0;
  background: #fff;
}
.free-camp-week-btn-label  { font-weight: 700; font-size: 14px; }
.free-camp-week-btn-range  { font-size: 12px; opacity: 0.75; }
.free-camp-week-btn-price  { font-weight: 700; font-size: 15px; margin-top: 2px; }

/* Resumen */
#free-camp-summary {
  background: #fafafa;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 16px 20px;
  margin-bottom: 16px;
}
.free-camp-summary-empty {
  text-align: center;
  color: #999;
  font-size: 14px;
  padding: 8px 0;
}
.free-camp-summary-title {
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 10px;
  color: #333;
}
.free-camp-summary-lines { margin-bottom: 12px; }
.free-camp-summary-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 0;
  font-size: 14px;
  color: #444;
}
.free-camp-summary-label { flex: 1; }
.free-camp-summary-price { font-weight: 600; white-space: nowrap; margin-left: 16px; }
.free-camp-summary-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 2px solid #1976d2;
  padding-top: 10px;
  font-size: 17px;
  font-weight: 700;
  color: #1976d2;
}


/* ════════��═════════════════���════════════════
   Admin: pestaña Campamento en producto
   ════════════════════════════════════════���══ */

/* Icono de la pestaña (WooCommerce usa ::before con Dashicons) */
#woocommerce-product-data ul.wc-tabs li.free_camp_options a::before {
  content: "\f508";               /* dashicons-palmtree */
  font-family: dashicons;
}

/* Semanas: scroll cuando hay muchas tarjetas */
#free-camp-weeks-repeater {
  max-height: 600px;
  overflow-y: auto;
  padding-top: 4px;
}

/* Sección título semanas */
.free-camp-section-title {
  font-size: 14px !important;
  font-weight: 600 !important;
  color: #1d2327 !important;
}

/* Wrap botón añadir */
.free-camp-add-wrap {
  padding: 8px 12px 16px;
}
.free-camp-add-wrap .button {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.free-camp-add-wrap .dashicons {
  font-size: 16px;
  width: 16px;
  height: 16px;
  line-height: 1;
}

/* Precios por día */
.free-camp-admin-price-pair {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-right: 20px;
}
.free-camp-admin-price-label {
  font-size: 12px;
  font-weight: 600;
  color: #555;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  min-width: 70px;
}
.free-camp-admin-price-currency {
  font-weight: 600;
  color: #888;
}

/* ─── Tarjeta de semana ─── */
.free-camp-week-row {
  background: #fff;
  border: 1px solid #dcdcde;
  border-radius: 6px;
  margin: 0 12px 12px;
  overflow: hidden;
  transition: opacity 0.2s, transform 0.2s;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
.free-camp-week-row:hover {
  border-color: #b0b5b9;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

/* Placeholder para sortable */
.free-camp-week-placeholder {
  border: 2px dashed #2271b1;
  border-radius: 6px;
  margin: 0 12px 12px;
  min-height: 60px;
  background: #f0f6fc;
}

/* Header tarjeta */
.free-camp-week-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: #f6f7f7;
  border-bottom: 1px solid #dcdcde;
  cursor: default;
}
.free-camp-week-handle {
  cursor: move;
  color: #999;
  font-size: 20px;
  line-height: 1;
}
.free-camp-week-handle:hover { color: #555; }
.free-camp-week-number {
  font-weight: 700;
  font-size: 13px;
  color: #2271b1;
  background: #e9f0f7;
  padding: 2px 8px;
  border-radius: 4px;
  min-width: 28px;
  text-align: center;
}
.free-camp-week-header-label {
  flex: 1;
  font-weight: 600;
  font-size: 13px;
  color: #1d2327;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.free-camp-remove-week {
  background: none !important;
  border: none !important;
  padding: 4px !important;
  cursor: pointer;
  color: #b32d2e !important;
  opacity: 0.5;
  transition: opacity 0.15s;
  line-height: 1;
  min-width: auto !important;
  min-height: auto !important;
}
.free-camp-remove-week:hover { opacity: 1; }
.free-camp-remove-week .dashicons { font-size: 18px; width: 18px; height: 18px; }

/* Body tarjeta */
.free-camp-week-body {
  padding: 14px;
}

/* Filas del grid */
.free-camp-row {
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
}
.free-camp-row:last-child { margin-bottom: 0; }

/* Campo genérico */
.free-camp-field {
  flex: 1;
  min-width: 0;
}
.free-camp-field--narrow {
  flex: 0 0 100px;
  max-width: 100px;
}
.free-camp-field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #50575e;
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.free-camp-field input[type="text"],
.free-camp-field input[type="number"],
.free-camp-field input[type="date"] {
  width: 100%;
  padding: 6px 10px;
  border: 1px solid #dcdcde;
  border-radius: 4px;
  font-size: 13px;
  line-height: 1.6;
  color: #2c3338;
  background: #fff;
  box-sizing: border-box;
  transition: border-color 0.15s;
}
.free-camp-field input:focus {
  border-color: #2271b1;
  outline: none;
  box-shadow: 0 0 0 1px #2271b1;
}
.free-camp-field-hint {
  display: block;
  font-size: 11px;
  color: #999;
  margin-top: 2px;
  font-style: italic;
}

/* Input con sufijo (€) */
.free-camp-input-with-suffix {
  display: flex;
  align-items: center;
}
.free-camp-input-with-suffix input {
  flex: 1;
  border-top-right-radius: 0 !important;
  border-bottom-right-radius: 0 !important;
  border-right: none !important;
  width: 100%;
  padding: 6px 10px;
  border: 1px solid #dcdcde;
  border-radius: 4px;
  font-size: 13px;
  line-height: 1.6;
  color: #2c3338;
  background: #fff;
  box-sizing: border-box;
  transition: border-color 0.15s;
}
.free-camp-input-with-suffix input:focus {
  border-color: #2271b1;
  outline: none;
  box-shadow: 0 0 0 1px #2271b1;
}
.free-camp-suffix {
  background: #f0f0f1;
  border: 1px solid #dcdcde;
  border-left: none;
  border-top-right-radius: 4px;
  border-bottom-right-radius: 4px;
  padding: 6px 10px;
  font-size: 13px;
  font-weight: 600;
  color: #666;
  line-height: 1.6;
}

/* Preview de fechas generadas */
.free-camp-dates-preview {
  margin-top: 4px;
  min-height: 0;
}
.free-camp-dates-preview:empty { display: none; }
.free-camp-preview-label {
  font-size: 12px;
  font-weight: 600;
  color: #50575e;
  margin-right: 4px;
}
.free-camp-preview-pill {
  display: inline-block;
  background: #e9f0f7;
  color: #2271b1;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
  margin: 2px 2px 2px 0;
}
.free-camp-preview-warning {
  font-size: 12px;
  color: #b32d2e;
  font-style: italic;
}


/* ═══════════════════════════════════════════
   Responsive
   ═══════════════════════════════════════════ */

@media (max-width: 782px) {
  .free-camp-row {
    flex-direction: column;
    gap: 10px;
  }
  .free-camp-field--narrow {
    flex: 1;
    max-width: 100%;
  }
  .free-camp-admin-price-pair {
    display: flex;
    margin-right: 0;
    margin-bottom: 8px;
  }
}

@media (max-width: 600px) {
  .free-camp-months {
    flex-direction: column;
    align-items: center;
  }
  .free-camp-month {
    max-width: 100%;
    width: 100%;
  }
  .free-camp-week-btns {
    flex-direction: column;
  }
  .free-camp-week-btn {
    width: 100%;
    min-width: auto;
  }
}
