/* ── components.css — Chips, toasts, toggle, category, payment-detail ── */

/* Transitions between steps */
.fade-in {
  animation: fadeIn 0.35s ease;
}
.fade-out {
  animation: fadeOut 0.2s ease forwards;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeOut {
  from { opacity: 1; transform: translateY(0); }
  to   { opacity: 0; transform: translateY(-8px); }
}

/* Progress dots and bars */
[id^="dot"] {
  transition: background-color 0.35s ease, transform 0.25s ease;
}
[id^="dot"].bg-accent {
  transform: scale(1.2);
}
[id^="bar"] {
  transition: background-color 0.4s ease;
}

/* Selectionable elements */
.chip {
  transition: all 0.2s ease;
  cursor: pointer;
  user-select: none;
}
.chip:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(196, 160, 172, 0.12);
  border-color: #c4a0ac;
}
.chip.active {
  background: #c4a0ac;
  color: #fff;
  border-color: #c4a0ac;
  animation: chipSelect 0.25s ease;
}
@keyframes chipSelect {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.04); }
  100% { transform: scale(1); }
}

.category-btn {
  transition: all 0.2s ease;
  cursor: pointer;
  user-select: none;
}
.category-btn:hover {
  border-color: #c4a0ac;
  background: rgba(196,160,172,0.06);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(196, 160, 172, 0.12);
}
.category-btn.active {
  background: #c4a0ac;
  color: #fff;
  border-color: #c4a0ac;
}

/* Type selector (lecturas cortas / extensas) */
.type-btn {
  transition: all 0.2s ease;
  cursor: pointer;
  user-select: none;
}
.type-btn:hover {
  border-color: #c4a0ac;
  background: rgba(196,160,172,0.06);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(196, 160, 172, 0.12);
}
.type-subtitle {
  font-weight: 400;
  opacity: 0.6;
}
.type-btn:hover .type-subtitle {
  opacity: 0.8;
}

.reading-panel {
  animation: fadeIn 0.35s ease;
}

/* Reading chip expandable description */
.reading-expand {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, opacity 0.25s ease, margin 0.3s ease;
}
.reading-expand.open {
  max-height: 200px;
  opacity: 1;
}
.reading-expand-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(196, 160, 172, 0.08);
  color: #9a8a8f;
  border: none;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.2s ease, color 0.2s ease, transform 0.25s ease;
}
.reading-expand-btn:hover {
  background: rgba(196, 160, 172, 0.18);
  color: #c4a0ac;
}
.reading-expand-btn:active {
  transform: scale(0.95);
}
.reading-expand-btn svg {
  width: 16px;
  height: 16px;
}

/* Category subtitles */
.category-subtitle {
  font-weight: 400;
  opacity: 0.6;
}
.category-btn.active .category-subtitle {
  opacity: 0.85;
}

/* Toggle */
.toggle-track {
  width: 44px;
  height: 24px;
  border-radius: 12px;
  transition: background 0.2s;
  cursor: pointer;
  position: relative;
}
.toggle-track::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  top: 2px;
  left: 2px;
  transition: transform 0.2s;
}
.toggle-track.on {
  background: #c4a0ac;
}
.toggle-track.on::after {
  transform: translateX(20px);
}
.toggle-track.off {
  background: #ccc;
}

/* Toast */
.toast-enter {
  animation: toastIn 0.3s ease forwards;
}
.toast-exit {
  animation: toastOut 0.3s ease forwards;
}
@keyframes toastIn {
  from { opacity: 0; transform: translateX(12px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes toastOut {
  from { opacity: 1; transform: translateX(0); }
  to   { opacity: 0; transform: translateX(12px); }
}

/* Button active state */
button:active {
  transform: scale(0.97);
  opacity: 0.85;
  transition: transform 0.1s ease, opacity 0.1s ease;
}

/* Payment detail panels */
.payment-detail {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height 0.35s ease, opacity 0.3s ease, margin 0.3s ease;
  margin-top: 0;
}
.payment-detail.open {
  max-height: 600px;
  opacity: 1;
  margin-top: 0.75rem;
}

input[type="date"]::-webkit-calendar-picker-indicator {
  cursor: pointer;
}

/* Custom date calendar - solo lunes a viernes */
.calendar-shell {}
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 2px;
}
.cal-weekday {
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: lowercase;
  color: #9a8a8f;
  padding: 4px 0 6px;
}
.cal-weekday.weekend { color: #dcc8d0; }
.cal-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  height: 40px;
  padding: 4px 2px;
  border: none;
  border-radius: 10px;
  background: transparent;
  font-family: inherit;
  font-size: 14px;
  color: #3a3535;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.cal-day:hover:not(:disabled) {
  background: rgba(196, 160, 172, 0.12);
  transform: translateY(-1px);
}
.cal-day.is-weekend {
  color: #e5d8dc;
  cursor: default;
}
.cal-day.is-past {
  color: #d6cfcd;
  cursor: default;
}
.cal-day.is-today:not(.selected) {
  box-shadow: inset 0 0 0 1px rgba(196, 160, 172, 0.5);
}
.cal-day.selected {
  background: #c4a0ac;
  color: #fff;
  font-weight: 600;
  box-shadow: 0 3px 10px rgba(196, 160, 172, 0.35);
}
.cal-nav {
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #e7dde0;
  border-radius: 50%;
  background: #fff;
  color: #9a8a8f;
  cursor: pointer;
  transition: all 0.2s ease;
}
.cal-nav:hover:not(:disabled) {
  border-color: #c4a0ac;
  color: #c4a0ac;
}
.cal-nav:disabled {
  opacity: 0.35;
  cursor: default;
}
.calendar-note {
  margin-top: 12px;
  text-align: center;
  font-size: 12px;
  color: #a08d93;
}
.cal-day:focus-visible, .cal-nav:focus-visible {
  outline: 2px solid rgba(196, 160, 172, 0.6);
  outline-offset: 1px;
}

/* Date picker trigger + collapsible calendar */
.date-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  background: #fff;
  border: 1px solid #e7dde0;
  border-radius: 12px;
  padding: 11px 14px;
  font-family: inherit;
  font-size: 14px;
  color: #3a3535;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.date-trigger:hover {
  border-color: #c4a0ac;
  box-shadow: 0 2px 10px rgba(196, 160, 172, 0.12);
}
.date-trigger .trigger-icon,
.date-trigger .chevron {
  color: #9a8a8f;
}
.date-trigger .chevron {
  transition: transform 0.25s ease;
}
.date-trigger.open .chevron {
  transform: rotate(180deg);
}
.calendar-collapse {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.35s ease, opacity 0.3s ease, margin-top 0.3s ease;
  margin-top: 0;
}
.calendar-collapse.open {
  max-height: 460px;
  opacity: 1;
  margin-top: 0.5rem;
}

/* Quiz - ¿Qué lectura necesitas hoy? */
.quiz-option {
  display: block;
  width: 100%;
  text-align: left;
  border: 1px solid #e7dde0;
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 13.5px;
  font-family: inherit;
  line-height: 1.35;
  color: #3a3535;
  background: #fff;
  cursor: pointer;
  transition: all 0.18s ease;
  margin-bottom: 8px;
}
.quiz-option:hover {
  border-color: #c4a0ac;
  background: rgba(196, 160, 172, 0.06);
  transform: translateX(2px);
}
.quiz-option.active {
  border-color: #c4a0ac;
  background: #c4a0ac;
  color: #fff;
}
.quiz-progress {
  display: flex;
  gap: 6px;
  margin-bottom: 18px;
}
.quiz-progress-dot {
  height: 3px;
  flex: 1;
  border-radius: 2px;
  background: #ece3e5;
  transition: background 0.25s ease;
}
.quiz-progress-dot.done {
  background: #c4a0ac;
}
/* Fluidez del quiz */
.quiz-fade {
  animation: quizFade 0.22s ease;
}
@keyframes quizFade {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.quiz-option {
  will-change: transform;
}
.quiz-option.active {
  transform: scale(1.02);
  box-shadow: 0 3px 10px rgba(196, 160, 172, 0.3);
}
/* Boton de cierre de overlays */
.overlay-card-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid #e7dde0;
  background: #fff;
  color: #9a8a8f;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 10;
}
.overlay-card-close:hover {
  border-color: #c4a0ac;
  color: #c4a0ac;
  background: rgba(196, 160, 172, 0.08);
}

/* Apertura y cierre suaves de overlays */
#quizOverlay:not(.hidden):not(.overlay-closing),
#lecturasGuideOverlay:not(.hidden):not(.overlay-closing),
#politicasOverlay:not(.hidden):not(.overlay-closing) {
  animation: overlayFadeIn 0.16s ease;
}
@keyframes overlayFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.overlay-closing {
  animation: overlayFadeOut 0.16s ease forwards;
}
@keyframes overlayFadeOut {
  from { opacity: 1; }
  to   { opacity: 0; }
}
.overlay-closing > div {
  animation: overlayCardOut 0.16s ease forwards;
}
@keyframes overlayCardOut {
  from { opacity: 1; transform: translateY(0); }
  to   { opacity: 0; transform: translateY(6px); }
}
/* Transiciones mas agiles de los overlays (mantiene el flujo) */
.politicas-card.fade-in,
.lecturas-guide-card.fade-in,
.quiz-card.fade-in {
  animation-duration: 0.2s;
}
/* Boton primario con mas presencia (mismo lenguaje que los chips) */
button.bg-accent {
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}
button.bg-accent:hover:not(:active) {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(196, 160, 172, 0.35);
}

/* Dia sin cupos (lleno) en el calendario */
.cal-day.is-full {
  color: #c8bfc2;
  background: #f1ecea;
  cursor: default;
}

/* Indicador de disponibilidad */
.cal-num { line-height: 1.2; }
.cal-dot { width: 7px; height: 7px; border-radius: 50%; background: #8bbd7e; }
.cal-dot.is-full { background: #de8b8b; }
.cal-dot.is-only-emergency { background: #d4b06b; }
.cal-day.selected .cal-dot { background: #fff; }
.calendar-note .note-row { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 16px; }
.calendar-note .note-item { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; }
.calendar-note .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto; }
.calendar-note .dot-green { background: #8bbd7e; }
.calendar-note .dot-red { background: #de8b8b; }
.calendar-note .dot-gold { background: #d4b06b; }

/* Modal: fecha agotada */
.fdate-overlay { display: none; position: fixed; inset: 0; z-index: 80; align-items: center; justify-content: center; padding: 20px; background: rgba(40, 30, 34, 0.4); }
.fdate-overlay.open { display: flex; }
.fdate-card { position: relative; width: 100%; max-width: 330px; background: #fff; border-radius: 20px; padding: 24px 20px 18px; text-align: center; box-shadow: 0 18px 44px rgba(40, 30, 34, 0.32); }
.fdate-close { position: absolute; top: 10px; right: 12px; border: none; background: transparent; font-size: 15px; line-height: 1; color: #c3b0b6; cursor: pointer; }
.fdate-emoji { color: #d4b06b; font-size: 14px; margin-bottom: 8px; }
.fdate-title { font-family: inherit; font-size: 19px; font-style: italic; font-weight: 600; color: #3a3535; margin-bottom: 8px; }
.fdate-text { font-size: 13px; line-height: 1.55; color: #8f7f84; margin-bottom: 18px; }
.fdate-btn { width: 100%; border: none; background: #c4a0ac; color: #fff; border-radius: 12px; padding: 11px; font-family: inherit; font-size: 14px; font-weight: 500; cursor: pointer; transition: background 0.15s ease; }
.fdate-btn:hover { background: #b8919e; }
.fdate-btn[hidden], .fdate-emergency[hidden] { display: none; }
.fdate-emergency { margin-top: 2px; }
.fdate-toggle-row { display: flex; align-items: center; justify-content: center; gap: 12px; margin-bottom: 14px; }
.fdate-toggle-label { font-size: 14px; font-weight: 500; color: #3a3535; }
.fdate-nothanks { display: block; margin: 0 auto; border: none; background: transparent; color: #8f7f84; font-size: 13px; text-decoration: underline; cursor: pointer; font-family: inherit; }

/* Aviso bajo el calendario */
.date-note { display: flex; align-items: center; gap: 8px; margin-top: 10px; margin-bottom: 16px; padding: 10px 12px; background: rgba(196, 160, 172, 0.10); border: 1px solid rgba(196, 160, 172, 0.28); border-radius: 12px; font-size: 12px; line-height: 1.5; color: #8f7f84; }
.date-note .date-note-icon { flex: 0 0 auto; width: 15px; height: 15px; color: #c4a0ac; }

/* ── Horario (menú desplegable, bloques de 30 min, 10:00 am – 6:00 pm) ── */
.slot-select {
  display: block;
  width: 100%;
  padding: 11px 38px 11px 14px;
  border: 1px solid #e7dde0;
  border-radius: 12px;
  background-color: #fff;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23c4a0ac' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 13px center;
  background-size: 15px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: #3a3535;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}
.slot-select:hover:not(:disabled) {
  border-color: #c4a0ac;
}
.slot-select:focus {
  outline: none;
}
.slot-select:focus-visible {
  border-color: #c4a0ac;
  box-shadow: 0 0 0 3px rgba(196, 160, 172, 0.18);
}
.slot-select:disabled {
  color: #9a8a8f;
  background-color: #f7f2f1;
  border-color: #eee6e8;
  cursor: not-allowed;
  opacity: 1;
}
.slot-select option {
  color: #3a3535;
  background: #fff;
}
.slot-hint {
  font-size: 12px;
  line-height: 1.5;
  color: #8f7f84;
}
.slot-hint-selected {
  color: #c4a0ac;
  font-weight: 600;
}

