/* ─── Reset & base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --blue:       #1a56db;
  --blue-dark:  #1240a8;
  --blue-light: #e8f0fe;
  --green:      #1a7a35;
  --green-bg:   #e6f4ea;
  --red:        #c0392b;
  --red-bg:     #fdecea;
  --gray:       #6b7280;
  --gray-light: #f3f4f6;
  --border:     #e0e4ef;
  --text:       #111827;
  --radius:     10px;
}

body {
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 15px;
  color: var(--text);
  background: #f7f8fc;
  min-height: 100vh;
}

/* ─── Layout exterior con mascots ────────────────────────────── */
.booking-outer {
  display: flex;
  align-items: flex-start;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 8px;
  gap: 0;
}

/* ─── Wrapper central ───────────────────────────────────────── */
.booking-wrap {
  flex: 1;
  min-width: 0;
  padding: 24px 16px 48px;
}

/* ─── Mascots ────────────────────────────────────────────────── */
.mascot-side {
  width: 160px;
  flex-shrink: 0;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 32px;
  position: sticky;
  top: 24px;
  align-self: flex-start;
}
.mascot-side img {
  height: 280px;
  width: auto;
  max-width: 150px;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 6px 14px #0002);
  opacity: 1;
  transition: opacity 0.3s ease;
}
/* Ocultar en pantallas pequeñas */
@media (max-width: 700px) {
  .mascot-side { display: none; }
}
@media (max-width: 900px) {
  .mascot-side { width: 110px; }
  .mascot-side img { height: 200px; max-width: 105px; }
}

/* ─── Steps indicator ────────────────────────────────────────── */
.steps {
  display: flex;
  gap: 0;
  margin-bottom: 28px;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--gray-light);
  border: 1px solid var(--border);
}
.steps .step {
  flex: 1;
  padding: 10px 8px;
  text-align: center;
  font-size: .8rem;
  font-weight: 600;
  color: var(--gray);
  position: relative;
}
.steps .step.active {
  background: var(--blue);
  color: #fff;
}
.steps .step.done {
  background: var(--blue-light);
  color: var(--blue);
}

/* ─── Cards ──────────────────────────────────────────────────── */
.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: 0 1px 6px #0000000a;
}
.card-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.card-title .ico { font-size: 1.2rem; }

/* ─── Landing content ────────────────────────────────────────── */
.landing-content { width: 100%; }

/* ─── Calendar ───────────────────────────────────────────────── */
.cal-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.cal-nav button {
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  width: 34px; height: 34px;
  cursor: pointer;
  font-size: 1rem;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s;
}
.cal-nav button:hover { background: var(--gray-light); }
.cal-month { font-weight: 700; font-size: 1rem; }

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
.cal-dow {
  text-align: center;
  font-size: .72rem;
  font-weight: 700;
  color: var(--gray);
  padding-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.cal-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-size: .88rem;
  cursor: default;
  transition: background .15s, color .15s;
  font-weight: 500;
}
.cal-day.empty { background: transparent; }
.cal-day.past  { color: #c4c8d4; }
.cal-day.unavailable { color: #c4c8d4; background: transparent; }
.cal-day.available {
  cursor: pointer;
  background: var(--blue-light);
  color: var(--blue);
  font-weight: 700;
}
.cal-day.available:hover { background: var(--blue); color: #fff; }
.cal-day.selected { background: var(--blue); color: #fff; }
.cal-day.today { outline: 2px solid var(--blue); outline-offset: -2px; }
.cal-loading { text-align: center; padding: 32px; color: var(--gray); font-size: .9rem; }

/* ─── Slot list ──────────────────────────────────────────────── */
.selected-date-label {
  font-size: .88rem;
  color: var(--gray);
  margin-bottom: 12px;
}
.selected-date-label strong { color: var(--text); }

.slots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 8px;
}
.slot-btn {
  padding: 11px 8px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  background: #fff;
  text-align: center;
  cursor: pointer;
  transition: border-color .15s, background .15s;
  font-size: .9rem;
  font-weight: 600;
  color: var(--text);
}
.slot-btn:hover   { border-color: var(--blue); background: var(--blue-light); }
.slot-btn.selected { border-color: var(--blue); background: var(--blue); color: #fff; }
.slot-btn.full    {
  opacity: .45;
  cursor: not-allowed;
  background: var(--gray-light);
  color: var(--gray);
  text-decoration: line-through;
}
.slot-empty { color: var(--gray); padding: 16px 0; }

/* ─── Form ───────────────────────────────────────────────────── */
.form-group { margin-bottom: 16px; }
.form-group label {
  display: block;
  font-weight: 600;
  font-size: .88rem;
  margin-bottom: 6px;
  color: #374151;
}
.form-group label .req { color: var(--red); margin-left: 2px; }
.form-control {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: .95rem;
  color: var(--text);
  background: #fff;
  transition: border-color .15s;
}
.form-control:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px #1a56db22;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* ─── Buttons ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 11px 22px;
  border-radius: 8px;
  border: none;
  font-size: .95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, opacity .15s;
  text-decoration: none;
}
.btn-primary  { background: var(--blue);  color: #fff; }
.btn-primary:hover  { background: var(--blue-dark); }
.btn-outline  { background: transparent; border: 1.5px solid var(--border); color: var(--text); }
.btn-outline:hover  { background: var(--gray-light); }
.btn-full { width: 100%; justify-content: center; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.btn-row {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 8px;
}

/* ─── Alerts ──────────────────────────────────────────────────── */
.alert {
  padding: 14px 18px;
  border-radius: 8px;
  margin-bottom: 16px;
  font-size: .9rem;
}
.alert-success { background: var(--green-bg); color: var(--green); }
.alert-error   { background: var(--red-bg);   color: var(--red);   }
.alert-info    { background: var(--blue-light); color: var(--blue); }

/* ─── Confirmation box ────────────────────────────────────────── */
.confirm-box {
  text-align: center;
  padding: 32px 24px;
}
.confirm-box .ico-big { font-size: 3.5rem; line-height: 1; margin-bottom: 12px; }
.confirm-box h2 { font-size: 1.4rem; margin-bottom: 8px; }
.confirm-box p  { color: var(--gray); margin-bottom: 20px; }
.confirm-details {
  background: var(--gray-light);
  border-radius: 10px;
  padding: 16px 20px;
  display: inline-block;
  text-align: left;
  margin-bottom: 24px;
  min-width: 240px;
}
.confirm-details dt { font-size: .8rem; color: var(--gray); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.confirm-details dd { font-weight: 700; font-size: 1.05rem; margin-bottom: 10px; }
.confirm-details dd:last-child { margin-bottom: 0; }

/* ─── Footer público ─────────────────────────────────────────── */
.public-footer {
  text-align: center;
  padding: 18px 16px 24px;
  font-size: .72rem;
  color: #b0b8cc;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.footer-beta {
  background: #e8f0fe;
  color: #6b84c4;
  font-size: .65rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 20px;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.footer-admin {
  text-decoration: none;
  font-size: .85rem;
  line-height: 1;
  opacity: .25;
  transition: opacity .2s;
}
.footer-admin:hover { opacity: .7; }

/* ─── Spinner ─────────────────────────────────────────────────── */
.spinner {
  display: inline-block;
  width: 18px; height: 18px;
  border: 2.5px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin .6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Landing layout con mascotas ───────────────────────────── */
.landing-layout {
  display: grid;
  grid-template-columns: 160px 1fr 160px;
  gap: 12px;
  align-items: end;
}
.landing-content {
  min-width: 0;
}
.landing-mascot {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  height: 280px;        /* altura fija igual para las dos columnas */
}
.landing-mascot img {
  height: 100%;         /* ambas imágenes ocupan la misma altura */
  width: auto;          /* el ancho se adapta a la proporción */
  max-width: 150px;     /* tope de anchura por si alguna es muy ancha */
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 4px 12px #0002);
}

/* ─── Landing: tarjetas de servicio ─────────────────────────── */
.landing-svc-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: #fff;
  border: 1px solid var(--border);
  border-left: 4px solid var(--svc-color, var(--blue));
  border-radius: 12px;
  padding: 20px 20px 20px 22px;
  margin-bottom: 12px;
  box-shadow: 0 2px 8px #00000008;
  transition: box-shadow .15s, transform .12s;
}
.landing-svc-card:hover {
  box-shadow: 0 4px 18px #00000012;
  transform: translateY(-1px);
}
.landing-svc-icon {
  font-size: 2rem;
  line-height: 1;
  flex-shrink: 0;
}
.landing-svc-info {
  flex: 1;
  min-width: 0;
}
.landing-svc-name {
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--text);
  margin-bottom: 3px;
}
.landing-svc-desc {
  font-size: .84rem;
  color: var(--gray);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.landing-svc-btn {
  flex-shrink: 0;
  padding: 9px 20px;
  font-size: .88rem;
  font-weight: 700;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  color: #fff;
  white-space: nowrap;
  transition: opacity .15s, transform .1s;
}
.landing-svc-btn:hover  { opacity: .86; transform: translateY(-1px); }
.landing-svc-btn:active { transform: translateY(0); }
@media (max-width: 480px) {
  .landing-svc-card { flex-wrap: wrap; gap: 12px; }
  .landing-svc-btn  { width: 100%; text-align: center; }
}

/* ─── Cabecera de vista de fechas de servicio ────────────────── */
.svc-view-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 16px;
  background: #fafbfd;
  border: 1px solid var(--border);
  border-left: 4px solid var(--svc-color, var(--blue));
  border-radius: 10px;
  margin-bottom: 2px;
}

/* ─── Service cards (diseño compacto unificado) ──────────────── */
.svc-card {
  background: #fff;
  border: 1px solid var(--border);
  border-left: 4px solid var(--svc-color, var(--blue));
  border-radius: 12px;
  margin-bottom: 14px;
  box-shadow: 0 2px 8px #00000008;
  overflow: hidden;
}
.svc-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 18px 10px;
  border-bottom: 1px solid var(--border);
  background: #fafbfd;
}
.svc-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: .73rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .09em;
  padding: 3px 11px;
  border-radius: 20px;
}
.svc-date-count {
  font-size: .76rem;
  color: var(--gray);
  font-weight: 500;
}
.svc-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 18px;
  border-bottom: 1px solid var(--border);
  transition: background .12s;
}
.svc-row:last-child { border-bottom: none; }
.svc-row:hover { background: #f8fafc; }
.svc-row-info {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px 10px;
}
.svc-row-date {
  font-weight: 700;
  font-size: .97rem;
  color: var(--text);
}
.svc-row-time {
  font-size: .82rem;
  color: var(--gray);
}
.svc-row-slots {
  display: inline-block;
  background: var(--green-bg);
  color: var(--green);
  font-size: .71rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
}
.svc-row-note {
  font-size: .8rem;
  color: var(--gray);
  font-style: italic;
  width: 100%;
  margin-top: 1px;
}
.svc-row-btn {
  flex-shrink: 0;
  padding: 8px 18px;
  font-size: .86rem;
  font-weight: 700;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
  color: #fff;
  transition: opacity .15s, transform .1s;
}
.svc-row-btn:hover  { opacity: .86; transform: translateY(-1px); }
.svc-row-btn:active { transform: translateY(0); }

@media (max-width: 480px) {
  .svc-row { flex-direction: column; align-items: flex-start; }
  .svc-row-btn { width: 100%; text-align: center; padding: 10px 18px; }
}

/* ─── No dates box ───────────────────────────────────────────── */
.no-dates-box {
  text-align: center;
  padding: 48px 24px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
}
.no-dates-ico {
  font-size: 3.5rem;
  margin-bottom: 16px;
  opacity: .6;
}
.no-dates-box h2 {
  font-size: 1.25rem;
  margin-bottom: 12px;
  color: var(--text);
}
.no-dates-box p {
  color: var(--gray);
  font-size: .95rem;
  line-height: 1.7;
  max-width: 420px;
  margin: 0 auto 20px;
}
.no-dates-hint {
  display: inline-block;
  background: var(--gray-light);
  color: var(--gray);
  font-size: .82rem;
  padding: 8px 18px;
  border-radius: 20px;
}

/* ─── Protección de datos ────────────────────────────────────── */
.privacy-box {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 16px;
}
.privacy-text {
  font-size: .75rem;
  color: #6b7280;
  line-height: 1.6;
  margin: 0 0 8px;
}
.privacy-text:last-of-type { margin-bottom: 12px; }
.privacy-check {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  cursor: pointer;
}
.privacy-check input[type=checkbox] {
  margin-top: 2px;
  flex-shrink: 0;
  width: 15px;
  height: 15px;
  accent-color: var(--blue);
  cursor: pointer;
}
.privacy-check span {
  font-size: .78rem;
  color: #374151;
  font-weight: 600;
  line-height: 1.5;
}

/* ─── Back button ────────────────────────────────────────────── */
.back-btn {
  background: none;
  border: none;
  color: var(--blue);
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  margin-bottom: 14px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.back-btn:hover { text-decoration: underline; }

/* ─── Responsive ──────────────────────────────────────────────── */
@media (max-width: 540px) {
  .landing-layout {
    grid-template-columns: 80px 1fr 80px;
    gap: 6px;
  }
  .landing-mascot {
    height: 160px;
  }
  .landing-mascot img { max-width: 76px; }
}
@media (max-width: 380px) {
  .landing-layout {
    grid-template-columns: 1fr;
  }
  .landing-mascot { display: none; }
}
@media (max-width: 480px) {
  .form-row { grid-template-columns: 1fr; }
  .slots-grid { grid-template-columns: repeat(3, 1fr); }
  .announce-date { font-size: 1.3rem; }
  .announce-card--big .announce-date { font-size: 1.5rem; }
}
