/* =========================================================
   CAMPSITE BOOKING PLUGIN — Estilos v2
   ========================================================= */

:root {
  --csb-primary:      #4a9e5c;
  --csb-primary-dark: #357a45;
  --csb-occupied:     #e05c5c;
  --csb-occupied-bg:  #fde8e8;
  --csb-available-bg: #f0f9f2;
  --csb-selected:     #2563eb;
  --csb-selected-bg:  #dbeafe;
  --csb-border:       #d8e8dc;
  --csb-bg:           #f2f7f3;
  --csb-card-bg:      #ffffff;
  --csb-text:         #2c3e2d;
  --csb-text-light:   #6b8070;
  --csb-radius:       14px;
  --csb-shadow:       0 2px 16px rgba(74,158,92,.10);
}

/* ── Base ───────────────────────────────────────────────── */
.csb-wrapper {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  max-width: 900px;
  margin: 0 auto;
  color: var(--csb-text);
  font-size: 15px;
}
.csb-main-title {
  font-size: 1.65rem;
  font-weight: 700;
  margin: 0 0 1.5rem;
}

/* ── Cards / Secciones ─────────────────────────────────── */
.csb-calendar-section,
.csb-spots-section,
.csb-extras-section,
.csb-form-section {
  background: var(--csb-card-bg);
  border-radius: var(--csb-radius);
  box-shadow: var(--csb-shadow);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

/* ── Calendario ─────────────────────────────────────────── */
.csb-calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  gap: .5rem;
}
.csb-month-title { font-size: 1.35rem; font-weight: 700; margin: 0; flex: 1; text-align: center; }
.csb-cal-nav {
  background: none;
  border: 1.5px solid var(--csb-border);
  border-radius: 8px;
  width: 38px; height: 38px;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--csb-primary);
  display: flex; align-items: center; justify-content: center;
  transition: background .15s, color .15s;
}
.csb-cal-nav:hover { background: var(--csb-primary); color: #fff; border-color: var(--csb-primary); }

.csb-lang-flags { display: flex; gap: 4px; }
.csb-flag { font-size: 1.25rem; cursor: pointer; opacity: .45; transition: opacity .15s; }
.csb-flag.active, .csb-flag:hover { opacity: 1; }

.csb-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
}
.csb-cal-weekday {
  text-align: center;
  font-size: .72rem;
  font-weight: 700;
  color: var(--csb-text-light);
  padding: 4px 0 8px;
  text-transform: uppercase;
}
.csb-cal-day {
  aspect-ratio: 1;
  display: flex; align-items: center; justify-content: center;
  border-radius: 10px;
  border: 1.5px solid #e5eee7;
  font-size: .93rem;
  font-weight: 500;
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
  background: #fff;
  min-height: 42px;
  user-select: none;
}
.csb-cal-day:hover { border-color: var(--csb-primary); background: var(--csb-available-bg); }
.csb-cal-day--empty { border-color: transparent; background: transparent; cursor: default; pointer-events: none; }
.csb-cal-day--past  { color: #c5d0c8; border-color: #eef2ef; cursor: not-allowed; background: #fafbfa; }
.csb-cal-day--today { border-color: var(--csb-primary); color: var(--csb-primary); font-weight: 700; }
.csb-cal-day--selected { background: var(--csb-primary) !important; color: #fff !important; border-color: var(--csb-primary); font-weight: 700; }
.csb-cal-day--in-range { background: var(--csb-available-bg); border-color: var(--csb-primary); color: var(--csb-primary-dark); border-radius: 0; }
.csb-cal-day--range-start { border-radius: 10px 0 0 10px; }
.csb-cal-day--range-end   { border-radius: 0 10px 10px 0; }

/* Fecha resumen */
.csb-dates-summary {
  display: flex; flex-wrap: wrap; gap: .75rem;
  align-items: center; margin-top: 1.25rem;
}
.csb-date-chip {
  display: flex; flex-direction: column;
  background: var(--csb-bg); border-radius: 10px;
  padding: .5rem 1rem; min-width: 110px;
}
.csb-date-label { font-size: .65rem; font-weight: 700; letter-spacing: .08em; color: var(--csb-text-light); text-transform: uppercase; }
.csb-date-value { font-size: 1.05rem; font-weight: 700; }

/* ── Mapa de plazas ─────────────────────────────────────── */
.csb-spots-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .75rem; margin-bottom: 1.25rem; }
.csb-spots-header h3 { font-size: 1.15rem; font-weight: 700; margin: 0; }
.csb-legend { display: flex; align-items: center; gap: .75rem; font-size: .8rem; color: var(--csb-text-light); }
.csb-legend-dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-right: 3px; }
.csb-legend-dot--available { background: var(--csb-primary); }
.csb-legend-dot--occupied  { background: var(--csb-occupied); }
.csb-legend-dot--selected  { background: var(--csb-selected); }

.csb-spot-map { background: var(--csb-bg); border-radius: var(--csb-radius); padding: 1.5rem; }
.csb-spot-row-label { font-size: .7rem; font-weight: 800; letter-spacing: .1em; color: var(--csb-text-light); text-transform: uppercase; margin: 0 0 .75rem; }
.csb-spot-row { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: .75rem; }
.csb-vial { text-align: center; font-size: .8rem; color: var(--csb-text-light); font-style: italic; padding: .4rem 0; margin: .25rem 0; border-top: 1px dashed var(--csb-border); border-bottom: 1px dashed var(--csb-border); }
.csb-entrada-label { text-align: right; font-size: .75rem; font-weight: 700; color: var(--csb-text-light); letter-spacing: .08em; margin-top: .5rem; }

.csb-spot-card {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  width: 80px; min-height: 72px;
  border-radius: 12px; border: 2px solid transparent;
  cursor: pointer; transition: transform .15s, box-shadow .15s, border-color .15s;
  font-weight: 700; user-select: none;
}
.csb-spot-card--available { background: #fff; border-color: #c3dfc9; color: var(--csb-primary); }
.csb-spot-card--available:hover { border-color: var(--csb-primary); transform: translateY(-2px); box-shadow: 0 4px 12px rgba(74,158,92,.2); }
.csb-spot-card--occupied  { background: var(--csb-occupied-bg); border-color: #f5b8b8; color: var(--csb-occupied); cursor: not-allowed; }
.csb-spot-card--selected  { background: var(--csb-selected); border-color: #1d4ed8; color: #fff; transform: translateY(-2px); box-shadow: 0 4px 16px rgba(37,99,235,.3); }
.csb-spot-number { font-size: 1.4rem; line-height: 1; }
.csb-spot-status { font-size: .6rem; letter-spacing: .08em; text-transform: uppercase; margin-top: 4px; opacity: .85; }
.csb-spot-map__loading { text-align: center; color: var(--csb-text-light); font-style: italic; padding: 2rem 0; margin: 0; }
.csb-auto-update { display: flex; align-items: center; gap: 6px; font-size: .8rem; color: var(--csb-text-light); margin: .75rem 0 0; font-style: italic; }

/* ── Extras: Personas + Servicios ──────────────────────── */
.csb-selected-spot-banner {
  background: linear-gradient(135deg, var(--csb-primary), var(--csb-primary-dark));
  color: #fff;
  border-radius: 10px;
  padding: .8rem 1.2rem;
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 1.25rem;
}

.csb-extras-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-bottom: 1.25rem;
}
@media (max-width: 600px) { .csb-extras-grid { grid-template-columns: 1fr; } }

.csb-extras-card {
  background: var(--csb-bg);
  border-radius: 12px;
  padding: 1.25rem;
  border: 1.5px solid var(--csb-border);
}
.csb-extras-card__title {
  display: flex; align-items: center; gap: .4rem;
  font-size: .95rem; font-weight: 700; margin: 0 0 1rem;
  color: var(--csb-text);
}

/* Control de personas */
.csb-persons-control {
  display: flex; align-items: center; gap: 1rem;
}
.csb-persons-btn {
  width: 40px; height: 40px;
  border-radius: 50%; border: 2px solid var(--csb-primary);
  background: #fff; color: var(--csb-primary);
  font-size: 1.3rem; font-weight: 700;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background .15s, color .15s;
  line-height: 1;
}
.csb-persons-btn:hover { background: var(--csb-primary); color: #fff; }
.csb-persons-count {
  font-size: 2rem; font-weight: 800; min-width: 2.5rem;
  text-align: center; color: var(--csb-primary);
}
.csb-persons-note {
  font-size: .8rem; color: var(--csb-text-light);
  margin: .75rem 0 0; line-height: 1.4;
}
.csb-persons-note--supplement { color: var(--csb-occupied); font-weight: 600; }

/* ── Servicios incluidos (no seleccionables, informativos) ── */
.csb-services-list { display: flex; flex-direction: column; gap: .5rem; }
.csb-services-loading { color: var(--csb-text-light); font-style: italic; font-size: .9rem; margin: 0; }
.csb-no-services     { color: var(--csb-text-light); font-style: italic; font-size: .9rem; margin: 0; }

.csb-service-included {
  display: flex; align-items: center; gap: .65rem;
  background: var(--csb-available-bg);
  border: 1.5px solid var(--csb-border);
  border-radius: 8px;
  padding: .65rem .9rem;
}
.csb-service-included__check {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; flex-shrink: 0;
  background: var(--csb-primary); color: #fff;
  border-radius: 50%; font-size: .8rem; font-weight: 700;
  line-height: 1;
}
.csb-service-included__name {
  flex: 1; font-weight: 600; font-size: .92rem; color: var(--csb-text);
}
.csb-service-included__price {
  font-weight: 700; font-size: .92rem;
  color: var(--csb-primary); white-space: nowrap;
}

/* Caja de precio */
.csb-price-box {
  background: var(--csb-text);
  color: #fff;
  border-radius: 12px;
  padding: 1.1rem 1.4rem;
  margin-bottom: 1.25rem;
}
.csb-price-box--compact { margin-bottom: 0; }
.csb-price-box__header {
  display: flex; justify-content: space-between; align-items: center;
  font-size: .85rem; opacity: .75; margin-bottom: .6rem;
}
.csb-price-total { font-size: 1.6rem; font-weight: 800; color: #fff; }
.csb-price-breakdown { border-top: 1px solid rgba(255,255,255,.15); padding-top: .7rem; }
.csb-breakdown-line {
  display: flex; justify-content: space-between;
  font-size: .83rem; padding: .22rem 0; opacity: .85;
}
.csb-breakdown-line:last-child { border-top: 1px solid rgba(255,255,255,.2); padding-top: .5rem; margin-top: .3rem; font-weight: 700; opacity: 1; }
.csb-breakdown-amount { font-weight: 600; white-space: nowrap; }

/* Acciones extras */
.csb-extras-actions {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 1rem;
}

/* ── Resumen de reserva ─────────────────────────────────── */
.csb-booking-summary {
  background: linear-gradient(135deg, #f0faf2 0%, #e8f5eb 100%);
  border: 1.5px solid var(--csb-border);
  border-radius: var(--csb-radius);
  overflow: hidden;
  margin-bottom: 1.5rem;
}
.csb-booking-summary__header {
  display: flex; align-items: center; gap: .6rem;
  background: var(--csb-primary); color: #fff;
  font-weight: 700; font-size: 1rem;
  padding: .85rem 1.25rem;
}
.csb-booking-summary__body { padding: 1rem 1.25rem .5rem; }

.csb-summary-grid { display: flex; flex-direction: column; gap: .3rem; }
.csb-summary-row {
  display: flex; align-items: baseline; gap: .75rem;
  padding: .3rem 0; border-bottom: 1px dashed rgba(74,158,92,.2);
}
.csb-summary-row:last-child { border-bottom: none; }
.csb-summary-label {
  font-size: .78rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .05em; color: var(--csb-primary-dark);
  min-width: 80px; flex-shrink: 0;
}
.csb-summary-value { font-size: .92rem; color: var(--csb-text); }

.csb-booking-summary__price {
  margin: 0; border-radius: 0;
  background: #1a2e1d; color: #fff;
  padding: .9rem 1.25rem;
}
.csb-booking-summary__price .csb-price-box__header {
  font-size: .8rem; opacity: .7; margin-bottom: .5rem;
}
.csb-booking-summary__price .csb-price-total {
  font-size: 1.4rem; font-weight: 800;
}
.csb-booking-summary__price .csb-breakdown-line {
  font-size: .8rem; padding: .18rem 0;
}

.csb-booking-summary__checkin-notice {
  display: flex; align-items: center; gap: .5rem;
  padding: .6rem 1.25rem;
  background: rgba(74,158,92,.08);
  font-size: .85rem; color: var(--csb-primary-dark);
  border-top: 1px solid var(--csb-border);
}

/* ── Formulario ─────────────────────────────────────────── */
.csb-form-section h3 { margin: 0 0 1rem; font-size: 1.15rem; }
.csb-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 560px) { .csb-form-row { grid-template-columns: 1fr; } }

/* Campos auto-rellenados por el lookup postal (editables) */
.csb-postal-autofill {
    background: #f0fdf4;
    border-color: #86efac;
    transition: background .2s, border-color .2s;
}
.csb-postal-autofill:focus {
    background: #fff;
    border-color: var(--csb-primary) !important;
}
/* Status del lookup */
.csb-postal-status { font-size: .75rem; margin-top: 3px; min-height: 1.1em; display: block; }
.csb-postal-searching { color: #6b7280; }
.csb-postal-ok        { color: #16a34a; font-weight: 600; }
.csb-postal-error     { color: #9ca3af; font-style: italic; }
.csb-form-group { display: flex; flex-direction: column; gap: .35rem; margin-bottom: 1rem; }
.csb-form-group label { font-size: .85rem; font-weight: 600; color: var(--csb-text-light); }
.csb-form-group input,
.csb-form-group textarea {
  border: 1.5px solid var(--csb-border); border-radius: 8px;
  padding: .6rem .85rem; font-size: .95rem; color: var(--csb-text);
  transition: border-color .15s, box-shadow .15s; outline: none;
  font-family: inherit; width: 100%; box-sizing: border-box;
}
.csb-form-group input:focus,
.csb-form-group textarea:focus { border-color: var(--csb-primary); box-shadow: 0 0 0 3px rgba(74,158,92,.15); }
.csb-required { color: var(--csb-occupied); }

/* ── Condiciones ────────────────────────────────────────── */
.csb-terms-wrap { margin: 1rem 0 1.25rem; }
.csb-terms-label {
  display: flex; align-items: flex-start; gap: .75rem;
  cursor: pointer; user-select: none;
  padding: .9rem 1rem;
  border: 1.5px solid var(--csb-border);
  border-radius: 10px;
  background: var(--csb-bg);
  transition: border-color .15s, background .15s;
}
.csb-terms-label:hover { border-color: var(--csb-primary); background: var(--csb-available-bg); }
.csb-terms-label--error { border-color: var(--csb-occupied) !important; background: #fff8f8 !important; animation: csb-shake .35s ease; }
.csb-terms-label input[type="checkbox"] { display: none; }
.csb-terms-box {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; flex-shrink: 0; margin-top: 1px;
  border: 2px solid var(--csb-border); border-radius: 6px;
  background: #fff; transition: border-color .15s, background .15s;
}
.csb-terms-label input:checked ~ .csb-terms-box {
  background: var(--csb-primary); border-color: var(--csb-primary);
}
.csb-terms-label input:checked ~ .csb-terms-box::after {
  content: ''; display: block;
  width: 5px; height: 9px;
  border: 2px solid #fff; border-top: none; border-left: none;
  transform: rotate(45deg) translate(-1px, -1px);
}
.csb-terms-text { font-size: .88rem; color: var(--csb-text); line-height: 1.5; }
.csb-terms-text a { color: var(--csb-primary); font-weight: 600; text-decoration: underline; }
.csb-terms-text a:hover { color: var(--csb-primary-dark); }

@keyframes csb-shake {
  0%,100% { transform: translateX(0); }
  20%,60%  { transform: translateX(-6px); }
  40%,80%  { transform: translateX(6px); }
}

/* ── Botones ────────────────────────────────────────────── */
.csb-btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .65rem 1.4rem; border-radius: 10px;
  font-size: .95rem; font-weight: 600; border: none;
  cursor: pointer; transition: background .15s, transform .1s, box-shadow .15s;
  font-family: inherit; white-space: nowrap;
}
.csb-btn--primary { background: var(--csb-primary); color: #fff; }
.csb-btn--primary:hover { background: var(--csb-primary-dark); box-shadow: 0 4px 14px rgba(74,158,92,.35); }
.csb-btn--ghost { background: transparent; color: var(--csb-text-light); border: 1.5px solid var(--csb-border); }
.csb-btn--ghost:hover { background: var(--csb-bg); color: var(--csb-text); }
.csb-btn:disabled { opacity: .55; cursor: not-allowed; transform: none !important; }

/* Botón de envío — elegante, destacado */
.csb-btn--submit {
  background: linear-gradient(135deg, #4a9e5c 0%, #357a45 100%);
  color: #fff;
  font-size: 1.05rem; font-weight: 700;
  padding: .85rem 2rem;
  border-radius: 12px;
  letter-spacing: .02em;
  box-shadow: 0 4px 18px rgba(74,158,92,.30), inset 0 1px 0 rgba(255,255,255,.15);
  transition: transform .15s, box-shadow .15s, background .15s;
}
.csb-btn--submit:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(74,158,92,.40), inset 0 1px 0 rgba(255,255,255,.15);
}
.csb-btn--submit:active:not(:disabled) { transform: translateY(0); }

.csb-form-actions {
  display: flex; justify-content: space-between; align-items: center;
  gap: 1rem; flex-wrap: wrap; margin-top: .5rem;
}

/* Animación de giro para icono de carga */
@keyframes csb-spin { to { transform: rotate(360deg); } }
.csb-spin { animation: csb-spin .8s linear infinite; }

/* ── Éxito ──────────────────────────────────────────────── */
.csb-success-section {
  background: var(--csb-card-bg); border-radius: var(--csb-radius);
  box-shadow: var(--csb-shadow); padding: 3rem 2rem;
  text-align: center; margin-bottom: 1.5rem;
}
.csb-success-icon {
  width: 72px; height: 72px; border-radius: 50%;
  background: linear-gradient(135deg, #4a9e5c, #357a45); color: #fff;
  font-size: 2rem; display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 1rem;
  box-shadow: 0 6px 20px rgba(74,158,92,.30);
}
.csb-success-section h3 { font-size: 1.5rem; margin: 0 0 .5rem; }
.csb-success-section p { color: var(--csb-text-light); margin: 0 0 .75rem; }
.csb-success-total {
  font-size: 1.5rem; font-weight: 800; color: var(--csb-primary);
  margin-bottom: 1.5rem;
}
.csb-success-checkin {
  font-size: .85rem; font-weight: 400; color: var(--csb-text-light);
  margin-top: .4rem;
}

/* ══ PANEL POR DÍAS (Admin) ════════════════════════════════ */
.csb-panel-nav { margin-bottom: 1rem; display: flex; align-items: center; flex-wrap: wrap; gap: .5rem; }
.csb-panel-legend { margin-bottom: 1rem; font-size: .85rem; display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.csb-legend-cell {
  display: inline-block; width: 20px; height: 14px;
  border-radius: 4px; margin-right: 4px; vertical-align: middle;
}
.csb-legend-cell--free      { background: #f5f7f5; border: 1px solid #ddd; }
.csb-legend-cell--confirmed { background: #d4edda; border: 1px solid #4a9e5c; }
.csb-legend-cell--pending   { background: #fff3cd; border: 1px solid #e6a817; }
.csb-legend-cell--today     { background: #dbeafe; border: 1px solid #2563eb; }

.csb-day-grid-wrapper { overflow-x: auto; }
.csb-day-grid {
  border-collapse: collapse;
  min-width: 100%;
  font-size: .82rem;
  white-space: nowrap;
}
.csb-day-grid th,
.csb-day-grid td { border: 1px solid #e2e8e4; padding: 0; }

.csb-day-grid__spot-label {
  background: #f5f7f5;
  padding: .4rem .6rem;
  font-weight: 700;
  text-align: center;
  min-width: 56px;
  position: sticky; left: 0; z-index: 2;
  box-shadow: 2px 0 4px rgba(0,0,0,.06);
}
.csb-day-grid__spot-label small { display: block; font-weight: 400; font-size: .7rem; color: #6b8070; }

.csb-day-grid__day-header {
  text-align: center; padding: .3rem .25rem;
  background: #f5f7f5; min-width: 30px;
  font-weight: 600; font-size: .8rem;
}
.csb-day-grid__day-header--today { background: #dbeafe; color: #2563eb; }
.csb-day-wd { font-size: .65rem; font-weight: 400; color: #6b8070; }

.csb-day-cell { height: 32px; min-width: 30px; position: relative; }
.csb-day-cell--confirmed { background: #d4edda; }
.csb-day-cell--pending   { background: #fff3cd; }
.csb-day-cell--today     { outline: 2px solid #2563eb; outline-offset: -2px; }

.csb-cell-name {
  font-size: .65rem; font-weight: 700; color: #155724;
  position: absolute; left: 3px; top: 50%; transform: translateY(-50%);
  overflow: hidden; text-overflow: ellipsis; max-width: 60px;
}

/* ══ ADMIN PANEL ════════════════════════════════════════════ */
.csb-admin-wrap { max-width: 1200px; }
.csb-admin-filters { display: flex; gap: .5rem; margin-bottom: 1rem; flex-wrap: wrap; }
.csb-admin-table { font-size: .88rem !important; }
.csb-actions { display: flex; gap: .35rem; flex-wrap: wrap; align-items: center; }
.csb-badge {
  display: inline-block; padding: .22rem .65rem;
  border-radius: 20px; font-size: .74rem; font-weight: 700; text-transform: uppercase;
}
.csb-badge--pending   { background: #fff3cd; color: #856404; }
.csb-badge--confirmed { background: #d4edda; color: #155724; }
.csb-badge--cancelled { background: #f8d7da; color: #721c24; }

.csb-settings-preview {
  background: #f8fafc; border: 1px solid #e2e8f0;
  border-radius: 8px; padding: 1rem 1.25rem;
  margin: 1rem 0; max-width: 480px;
}
.csb-settings-preview h3 { margin: 0 0 .5rem; font-size: 1rem; }
.csb-settings-preview p  { margin: 0; font-size: .9rem; line-height: 2; }

.csb-help-box { background: #fff; border: 1px solid #e2e8f0; border-radius: 10px; padding: 1.5rem 2rem; max-width: 700px; }
.csb-help-box h2 { border-bottom: 1px solid #e2e8f0; padding-bottom: .5rem; margin-top: 1.5rem; }
.csb-help-box code { display: inline-block; background: #f1f5f9; border-radius: 6px; padding: .4rem .9rem; font-size: 1rem; margin: .5rem 0 1rem; }

/* ══ DRAWER DE RESERVA (Admin) ═════════════════════════════ */
#csb-drawer-overlay { backdrop-filter: blur(2px); }
#csb-drawer.csb-drawer--open { transform: translateX(0) !important; }

/* Celda clickable en el grid de días */
.csb-day-cell--link {
  cursor: pointer;
  transition: filter .12s, outline .1s;
}
.csb-day-cell--link:hover { filter: brightness(.88); outline: 2px solid #2d6a4f; outline-offset: -2px; }

/* Secciones del drawer */
.csb-dr-section {
  padding: 14px 20px;
  border-bottom: 1px solid #f0f0f0;
}
.csb-dr-section:last-child { border-bottom: none; }
.csb-dr-section-title {
  margin: 0 0 10px;
  font-size: .7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: #bbb;
}
.csb-dr-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 5px 0;
  gap: 12px;
}
.csb-dr-label {
  font-size: .84rem;
  color: #777;
  flex-shrink: 0;
}
.csb-dr-value {
  font-size: .9rem;
  color: #1a1a1a;
  font-weight: 600;
  text-align: right;
  word-break: break-word;
}
.csb-dr-total-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 0 4px;
  border-top: 2px solid #2d6a4f;
  margin-top: 6px;
}
.csb-dr-total-label { font-weight: 700; color: #1a1a1a; font-size: .95rem; }
.csb-dr-total-value { font-weight: 800; color: #2d6a4f; font-size: 1.05rem; }

/* Caja de nota/observaciones */
.csb-dr-notes {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: .88rem;
  color: #78350f;
  line-height: 1.55;
  white-space: pre-wrap;
}

/* Meta (fecha creación) */
.csb-dr-meta {
  padding: 10px 20px;
  font-size: .75rem;
  color: #bbb;
  text-align: right;
  border-top: 1px solid #f5f5f5;
}

/* Badge de estado en drawer */
.csb-dr-badge {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 20px;
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
}

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 640px) {
  .csb-spot-card { width: 62px; min-height: 58px; }
  .csb-spot-number { font-size: 1.1rem; }
  .csb-calendar-section, .csb-spots-section,
  .csb-extras-section, .csb-form-section { padding: 1rem; }
  .csb-date-chip { min-width: 85px; padding: .4rem .7rem; }
  .csb-price-total { font-size: 1.3rem; }
}

/* ══ SERVICIOS POR PLAZA — página dedicada ══════════════════ */
.csb-spot-svc-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 1.5rem;
  align-items: start;
  margin-top: 1rem;
}
@media (max-width: 780px) { .csb-spot-svc-layout { grid-template-columns: 1fr; } }

.csb-spot-svc-sidebar h3 {
  font-size: .85rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; color: #6b8070; margin: 0 0 .5rem;
}
.csb-spot-svc-list {
  list-style: none; margin: 0; padding: 0;
  border: 1px solid #d8e8dc; border-radius: 10px; overflow: hidden;
}
.csb-spot-svc-list li a {
  display: flex; align-items: center; gap: .5rem;
  padding: .6rem .9rem; text-decoration: none; color: #2c3e2d;
  border-bottom: 1px solid #e8f0ea; font-size: .88rem;
  transition: background .12s;
}
.csb-spot-svc-list li:last-child a { border-bottom: none; }
.csb-spot-svc-list li a:hover { background: #f0f9f2; }
.csb-spot-svc-list__item--active a { background: #e0f2e5 !important; font-weight: 700; }

.csb-spot-svc-num  { font-weight: 700; }
.csb-spot-svc-row  { font-size: .76rem; color: #6b8070; flex: 1; }
.csb-spot-svc-indicator { font-size: .9rem; }
.csb-spot-svc-indicator--custom { color: #4a9e5c; }
.csb-spot-svc-indicator--global { color: #bbb; }

.csb-spot-svc-form-wrap {
  background: #fff; border: 1px solid #d8e8dc;
  border-radius: 12px; padding: 1.5rem;
}
.csb-spot-svc-table {
  width: 100%; border-collapse: collapse; margin-top: .5rem;
}
.csb-spot-svc-table thead th {
  text-align: left; font-size: .78rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .05em;
  color: #6b8070; padding: .4rem .6rem;
  border-bottom: 2px solid #d8e8dc;
}
.csb-spot-svc-table tbody tr { border-bottom: 1px solid #eef4ef; }
.csb-spot-svc-table tbody tr:hover { background: #f7fdf8; }
.csb-spot-svc-table tbody td { padding: .65rem .6rem; vertical-align: middle; }
.csb-svc-row--checked { background: #f0faf2 !important; }

/* ══ LIVE REFRESH (Admin) ═══════════════════════════════════ */
.csb-admin-toolbar {
  display: flex; align-items: center;
  justify-content: space-between;
  flex-wrap: wrap; gap: .75rem;
  margin-bottom: 1rem;
}
.csb-live-status {
  display: flex; align-items: center; gap: .75rem; flex-wrap: wrap;
}
.csb-last-update {
  font-size: .82rem; color: #666;
}
.csb-live-badge {
  display: inline-block;
  background: #d4edda; color: #155724;
  font-size: .7rem; font-weight: 700;
  border-radius: 20px; padding: .15rem .55rem;
  margin-left: .75rem; vertical-align: middle;
  letter-spacing: .05em;
  animation: csb-pulse 2s ease-in-out infinite;
}
@keyframes csb-pulse {
  0%,100% { opacity: 1; }
  50%      { opacity: .55; }
}
.csb-spinning .dashicons { animation: csb-spin .6s linear infinite; }
@keyframes csb-spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.csb-no-reservations { color: #666; font-style: italic; padding: 1rem 0; }

/* ══ SERVICIOS POR PLAZA (Admin) ════════════════════════════ */
.csb-spot-services-row td { background: #f0f9f2 !important; }

.csb-spot-services-panel {
  padding: 1rem 1.25rem !important;
  border-left: 4px solid var(--csb-primary);
}
.csb-spot-services-title {
  margin: 0 0 .85rem;
  font-size: .92rem;
}
.csb-spot-services-checkboxes {
  display: flex; flex-wrap: wrap; gap: .6rem;
  margin-bottom: .85rem;
}
.csb-spot-svc-check {
  display: flex; align-items: center; gap: .45rem;
  background: #fff; border: 1.5px solid #c3dfc9;
  border-radius: 8px; padding: .45rem .85rem;
  cursor: pointer; transition: border-color .15s, background .15s;
  font-size: .87rem;
}
.csb-spot-svc-check:hover { border-color: var(--csb-primary); }
.csb-spot-svc-check--active { background: #e8f5ea; border-color: var(--csb-primary); }
.csb-spot-svc-check input[type="checkbox"] {
  accent-color: var(--csb-primary); cursor: pointer;
}
.csb-spot-svc-name { font-weight: 600; }
.csb-spot-svc-price { color: var(--csb-text-light); font-size: .78rem; margin-left: .25rem; }
.csb-spot-svc-inactive { color: #c00; font-size: .75rem; margin-left: .25rem; }

.csb-spot-services-actions {
  display: flex; gap: .5rem; flex-wrap: wrap; align-items: center;
}

/* Tags de servicios en tabla de plazas */
.csb-svc-tag {
  display: inline-block;
  background: var(--csb-available-bg);
  border: 1px solid var(--csb-border);
  border-radius: 12px;
  padding: .15rem .6rem;
  font-size: .78rem;
  font-weight: 600;
  color: var(--csb-primary-dark);
  margin: 1px;
}
.csb-global-services {
  color: #888; font-size: .82rem;
}

/* Desglose total */
.csb-breakdown-total {
  border-top: 1px solid rgba(255,255,255,.2) !important;
  padding-top: .5rem !important;
  margin-top: .3rem;
  font-weight: 700;
  opacity: 1 !important;
}

/* ══════════════════════════════════════════════════════════
   BLAKI — Asistente de reservas · Diseño profesional
   ══════════════════════════════════════════════════════════ */

.csb-blaki-section {
  margin-top: 2.5rem;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid #c8dece;
  box-shadow: 0 6px 28px rgba(53,122,69,.12), 0 1px 4px rgba(0,0,0,.06);
  display: flex;
  flex-direction: column;
  background: #f5f9f5;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
  font-size: .9rem;
}

/* ── Cabecera ─────────────────────────────────────────── */
.csb-blaki-header {
  display: flex;
  align-items: center;
  gap: .85rem;
  padding: .9rem 1.15rem;
  background: #1e4d2b;
  color: #fff;
}
.csb-blaki-header-avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,.15);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
  border: 2px solid rgba(255,255,255,.25);
}
.csb-blaki-header-info strong {
  display: block;
  font-size: .98rem;
  font-weight: 700;
  letter-spacing: .01em;
}
.csb-blaki-status {
  display: flex; align-items: center; gap: .3rem;
  font-size: .72rem;
  opacity: .75;
  margin-top: 2px;
}
.csb-blaki-status::before {
  content: '';
  width: 7px; height: 7px;
  background: #5fe07a;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
  box-shadow: 0 0 0 2px rgba(95,224,122,.3);
}

/* ── Área de mensajes ───────────────────────────────────── */
.csb-blaki-messages {
  min-height: 200px;
  max-height: 360px;
  overflow-y: auto;
  padding: 1.1rem 1rem;
  display: flex;
  flex-direction: column;
  gap: .75rem;
  background: #f5f9f5;
  scroll-behavior: smooth;
}
.csb-blaki-messages::-webkit-scrollbar      { width: 4px; }
.csb-blaki-messages::-webkit-scrollbar-thumb {
  background: #b8d4bc; border-radius: 4px;
}

/* ── Filas de mensaje ───────────────────────────────────── */
.csb-blaki-msg {
  display: flex;
  align-items: flex-end;
  gap: .5rem;
}
.csb-blaki-msg--bot  { align-self: flex-start; max-width: 86%; }
.csb-blaki-msg--user { align-self: flex-end;   max-width: 78%; flex-direction: row-reverse; }

/* Avatar del bot */
.csb-blaki-av {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: #1e4d2b;
  display: flex; align-items: center; justify-content: center;
  font-size: .95rem;
  flex-shrink: 0;
  margin-bottom: 18px; /* alinear con burbuja sobre el timestamp */
}

/* Columna burbuja + timestamp */
.csb-blaki-col       { display: flex; flex-direction: column; gap: 2px; }
.csb-blaki-col--user { align-items: flex-end; }

/* ── Burbujas ───────────────────────────────────────────── */
.csb-blaki-bubble {
  padding: .6rem .9rem;
  border-radius: 14px;
  line-height: 1.55;
  word-break: break-word;
  font-size: .875rem;
  /* Bot: blanca con sombra fina */
  background: #fff;
  color: #1a2e1c;
  border: 1px solid #ddeadf;
  border-bottom-left-radius: 4px;
  box-shadow: 0 1px 3px rgba(0,0,0,.07);
}
.csb-blaki-bubble--user {
  background: #1e4d2b;
  color: #fff;
  border: none;
  border-bottom-right-radius: 4px;
  border-bottom-left-radius: 14px;
  box-shadow: 0 2px 6px rgba(30,77,43,.25);
}

/* Timestamp */
.csb-blaki-time {
  font-size: .68rem;
  color: #8fa895;
  padding: 0 .1rem;
  letter-spacing: .02em;
}
.csb-blaki-time--user { color: #6a8c73; }

/* ── Indicador "escribiendo..." ─────────────────────────── */
.csb-blaki-bubble--typing {
  display: flex; align-items: center; gap: 5px;
  padding: .65rem .95rem;
  min-width: 56px;
  background: #fff;
  border-bottom-left-radius: 4px;
}
.csb-blaki-bubble--typing span {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #4a9e5c;
  display: inline-block;
  animation: csb-blaki-bounce 1.25s infinite ease-in-out;
}
.csb-blaki-bubble--typing span:nth-child(2) { animation-delay: .16s; }
.csb-blaki-bubble--typing span:nth-child(3) { animation-delay: .32s; }
@keyframes csb-blaki-bounce {
  0%, 80%, 100% { transform: translateY(0)    scale(.75); opacity: .45; }
  40%            { transform: translateY(-5px) scale(1);   opacity: 1; }
}

/* ── Chips de acceso rápido ─────────────────────────────── */
.csb-blaki-chips {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  padding: .65rem 1rem;
  background: #edf5ef;
  border-top: 1px solid #d0e8d4;
}
.csb-blaki-chip {
  background: #fff;
  border: 1.5px solid #4a9e5c;
  color: #2d6b3a;
  border-radius: 20px;
  padding: .3rem .85rem;
  font-size: .78rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, color .15s, box-shadow .15s;
  font-family: inherit;
  letter-spacing: .01em;
}
.csb-blaki-chip:hover {
  background: #2d6b3a;
  color: #fff;
  box-shadow: 0 2px 8px rgba(45,107,58,.25);
}

/* ── Footer: barra de escritura ─────────────────────────── */
.csb-blaki-footer {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .65rem .9rem;
  background: #edf5ef;
  border-top: 1px solid #d0e8d4;
}
.csb-blaki-input {
  flex: 1;
  border: 1.5px solid #c8dece;
  border-radius: 24px;
  background: #fff;
  padding: .55rem 1rem;
  font-size: .88rem;
  font-family: inherit;
  color: #1a2e1c;
  outline: none;
  transition: border-color .18s, box-shadow .18s;
  line-height: 1.4;
}
.csb-blaki-input::placeholder { color: #9cb8a0; }
.csb-blaki-input:focus {
  border-color: #4a9e5c;
  box-shadow: 0 0 0 3px rgba(74,158,92,.15);
}
.csb-blaki-send {
  width: 40px; height: 40px;
  flex-shrink: 0;
  background: #1e4d2b;
  border: none;
  border-radius: 50%;
  color: #fff;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s, transform .12s, box-shadow .15s;
  box-shadow: 0 2px 8px rgba(30,77,43,.3);
}
.csb-blaki-send:hover   { background: #2d6b3a; transform: scale(1.07); box-shadow: 0 4px 12px rgba(30,77,43,.4); }
.csb-blaki-send:active  { transform: scale(.93); }
.csb-blaki-send:disabled { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }

/* ── Botón CTA dentro del chat ──────────────────────────── */
.csb-blaki-cta {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  margin-top: .5rem;
  padding: .5rem 1rem;
  background: #1e4d2b;
  color: #fff;
  border: none;
  border-radius: 20px;
  font-size: .82rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  letter-spacing: .02em;
  box-shadow: 0 2px 8px rgba(30,77,43,.30);
  transition: background .15s, transform .12s, box-shadow .15s;
}
.csb-blaki-cta:hover {
  background: #2d6b3a;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(30,77,43,.38);
}
.csb-blaki-cta:active { transform: translateY(0); }

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 480px) {
  .csb-blaki-messages { max-height: 260px; min-height: 160px; }
  .csb-blaki-msg--bot,
  .csb-blaki-msg--user { max-width: 94%; }
}
