/*
  El Rinconín · Estilos del calendario
  Calendario mensual, modal de día, tipo-selector y pantalla de éxito.
*/

/* CALENDARIO */
.calendar-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px; padding: 0 4px;
}
.calendar-title {
  font-family: 'Fraunces', serif; font-size: 22px; font-weight: 600; text-transform: capitalize;
}
.cal-nav { display: flex; gap: 4px; }
.cal-nav button {
  width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 2px;
  background: var(--paper); font-size: 18px; color: var(--ink);
  display: flex; align-items: center; justify-content: center;
}
.cal-nav button:hover { background: var(--line-soft); border-color: var(--ink-soft); }

.weekdays { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; margin-bottom: 4px; }
.weekday {
  text-align: center; font-size: 10px; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--ink-soft); padding: 6px 0;
}
.weekday.weekend { color: var(--accent); }

.days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.day {
  aspect-ratio: 1; background: var(--paper); border: 1px solid var(--line-soft);
  border-radius: 2px; padding: 4px 5px; display: flex; flex-direction: column;
  font-size: 13px; position: relative; transition: all 0.15s;
  cursor: pointer; overflow: hidden;
}
.day:not(.empty):not(.disabled):hover {
  border-color: var(--accent); transform: translateY(-1px); box-shadow: var(--shadow);
}
.day.empty { background: transparent; border-color: transparent; cursor: default; pointer-events: none; }
.day.disabled { opacity: 0.35; cursor: not-allowed; background: var(--line-soft); }
.day.today { border-color: var(--ink); border-width: 2px; font-weight: 700; }
.day.reservable-free { background: linear-gradient(135deg, #faf4e8 0%, #f3e8d0 100%); }
.day.festivo { background: linear-gradient(135deg, #fdf3ee 0%, #f5dcc9 100%); }
.day.evento-bloqueo {
  background: linear-gradient(135deg, #b8904a 0%, #a87a38 100%) !important;
  color: var(--paper); font-weight: 700;
}
.day.evento-bloqueo .day-num { color: var(--paper); }
.day.festivo::before {
  content: '★'; position: absolute; top: 2px; right: 4px; color: var(--gold); font-size: 9px;
}
.day-num { font-weight: 600; font-size: 13px; }
.day-dots { margin-top: auto; display: flex; gap: 2px; flex-wrap: wrap; }
.dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; }
.dot.comida { background: var(--sage); }
.dot.cena { background: var(--accent); }
.dot.asamblea { background: var(--gold); border: 1px solid var(--ink-soft); }

.modal-overlay {
  position: fixed; inset: 0; background: rgba(45, 24, 16, 0.6);
  backdrop-filter: blur(4px); z-index: 100; display: none;
  align-items: flex-end; justify-content: center;
}
.modal-overlay.active { display: flex; animation: fadeIn 0.2s; }
.modal {
  background: var(--paper); width: 100%; max-width: 500px; max-height: 90vh;
  overflow-y: auto; border-radius: 12px 12px 0 0;
  padding: 24px 20px 32px; animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes slideUp { from { transform: translateY(100%); } to { transform: none; } }
@media (min-width: 500px) {
  .modal-overlay { align-items: center; }
  .modal { border-radius: 4px; max-height: 85vh; }
}
.modal-grip {
  width: 40px; height: 4px; background: var(--line); border-radius: 2px; margin: -8px auto 16px;
}
.modal-header { margin-bottom: 20px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.modal-date {
  font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--ink-soft); font-weight: 500;
}
.modal-title {
  font-family: 'Fraunces', serif; font-size: 24px; font-weight: 600;
  margin-top: 4px; text-transform: capitalize;
}
.modal-badge {
  display: inline-block; margin-top: 6px; font-size: 10px;
  letter-spacing: 0.15em; text-transform: uppercase; color: var(--gold);
  background: rgba(184, 144, 74, 0.12); padding: 3px 8px; border-radius: 2px; font-weight: 600;
}
.modal-close-x {
  position: absolute; top: 16px; right: 16px; font-size: 22px;
  color: var(--ink-soft); width: 32px; height: 32px; display: flex;
  align-items: center; justify-content: center; border-radius: 50%;
}
.modal-close-x:hover { background: var(--line-soft); color: var(--ink); }

.reserva-card {
  background: #fff; border: 1px solid var(--line); border-radius: 3px;
  padding: 14px 16px; margin-bottom: 10px; position: relative;
}
.reserva-card.comida { border-left: 3px solid var(--sage); }
.reserva-card.cena { border-left: 3px solid var(--accent); }
.reserva-card.asamblea { border-left: 3px solid var(--gold); background: rgba(184, 144, 74, 0.05); }
.reserva-card.oficial { border-left: 3px solid var(--gold); background: rgba(184, 144, 74, 0.08); }
.reserva-type {
  font-size: 10px; font-weight: 700; letter-spacing: 0.15em;
  text-transform: uppercase; color: var(--ink-soft); margin-bottom: 6px;
}
.reserva-titular {
  font-family: 'Fraunces', serif; font-size: 17px; font-weight: 600; margin-bottom: 2px;
}
.reserva-meta { font-size: 13px; color: var(--ink-soft); line-height: 1.6; }
.reserva-meta strong { color: var(--ink); }
.reserva-meta .tel {
  color: var(--accent); font-weight: 600; text-decoration: none;
  display: inline-flex; align-items: center; gap: 4px;
}
.reserva-note {
  margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--line);
  font-size: 13px; font-style: italic; color: var(--ink-soft);
}
.reserva-limpieza {
  margin-top: 6px; display: inline-block; font-size: 11px;
  background: rgba(122, 138, 95, 0.15); color: var(--sage);
  padding: 3px 8px; border-radius: 2px; font-weight: 600;
}
.cancel-btn {
  position: absolute; top: 10px; right: 10px; font-size: 11px;
  color: var(--accent); letter-spacing: 0.1em; text-transform: uppercase;
  padding: 4px 8px; border: 1px solid var(--accent); border-radius: 2px; background: transparent;
}
.cancel-btn:hover { background: var(--accent); color: var(--paper); }
.empty-state {
  text-align: center; padding: 20px; color: var(--ink-soft); font-style: italic; font-size: 14px;
}

.section-title { font-family: 'Fraunces', serif; font-size: 17px; font-weight: 600; margin: 20px 0 12px; }

/* Tipo-selector */
.tipo-selector { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 16px; }
.tipo-btn {
  padding: 12px; border: 1px solid var(--line); border-radius: 3px;
  background: #fff; text-align: center; transition: all 0.2s;
}
.tipo-btn.selected { border-color: var(--accent); background: rgba(168, 67, 44, 0.06); }
.tipo-btn.disabled { opacity: 0.4; cursor: not-allowed; }
.tipo-icon { font-size: 20px; margin-bottom: 4px; }
.tipo-label { font-size: 11px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; }
.tipo-sub { font-size: 10px; color: var(--ink-soft); margin-top: 2px; }

.comensales-input {
  display: flex; align-items: center; justify-content: center; gap: 16px;
  background: #fff; border: 1px solid var(--line); border-radius: 3px; padding: 14px;
}
.comensales-btn {
  width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 50%;
  font-size: 18px; color: var(--ink); display: flex;
  align-items: center; justify-content: center;
}
.comensales-btn:hover { border-color: var(--accent); color: var(--accent); }
.comensales-btn:disabled { opacity: 0.3; cursor: not-allowed; }
.comensales-num {
  font-family: 'Fraunces', serif; font-size: 32px; font-weight: 600;
  min-width: 60px; text-align: center;
}
.comensales-hint { text-align: center; font-size: 12px; color: var(--ink-soft); margin-top: 8px; font-style: italic; }

.socios-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.socio-chip {
  padding: 6px 12px; border: 1px solid var(--line); border-radius: 100px;
  background: #fff; font-size: 13px; display: flex; align-items: center; gap: 6px;
}
.socio-chip .remove { color: var(--accent); font-weight: 700; cursor: pointer; }
.add-socio-select, textarea.nota {
  width: 100%; padding: 12px; border: 1px solid var(--line);
  border-radius: 3px; background: #fff; font-size: 14px;
}
textarea.nota { resize: vertical; min-height: 60px; }
textarea.nota:focus, .add-socio-select:focus { outline: none; border-color: var(--accent); }

.checkbox-line {
  display: flex; align-items: center; gap: 10px; padding: 12px;
  background: #fff; border: 1px solid var(--line); border-radius: 3px;
  cursor: pointer; margin-bottom: 8px;
}
.checkbox-line input[type="checkbox"] { width: 18px; height: 18px; cursor: pointer; }
.checkbox-line span { font-size: 14px; }

.time-input {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line);
  border-radius: 3px; background: #fff; font-size: 14px;
}

.btn-submit {
  width: 100%; padding: 16px; background: var(--accent); color: var(--paper);
  border-radius: 3px; font-size: 12px; font-weight: 700;
  letter-spacing: 0.15em; text-transform: uppercase; margin-top: 20px;
  transition: background 0.2s, transform 0.1s;
}
.btn-submit:hover { background: var(--ink); }
.btn-submit:active { transform: scale(0.98); }
.btn-submit:disabled { background: var(--ink-soft); cursor: not-allowed; opacity: 0.5; }

.btn-secondary {
  width: 100%; padding: 14px; background: transparent; color: var(--ink);
  border: 1px solid var(--ink); border-radius: 3px; font-size: 12px;
  font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; margin-top: 10px;
}
.btn-secondary:hover { background: var(--ink); color: var(--paper); }

/* SUCCESS SCREEN */
.success-screen { text-align: center; padding: 30px 16px; }
.success-screen .check {
  width: 72px; height: 72px; border-radius: 50%;
  background: var(--sage); color: #fff; font-size: 36px;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 20px; animation: pop 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes pop { from { transform: scale(0); } to { transform: scale(1); } }
.success-screen h2 { font-size: 26px; font-style: italic; margin-bottom: 10px; }
.success-screen p { color: var(--ink-soft); margin-bottom: 20px; }

