@charset "UTF-8";
/* CSS Document */

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 12px;
  min-height: 100vh;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #e5e7eb;
  color: #111827;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

/* CONTENEDOR PRINCIPAL */

.planner-app {
  background: #ffffff;
  width: 100%;
  max-width: 1280px;
  border-radius: 10px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
}

/* HEADER */

.planner-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 4px solid #1f2b5b;
  background: #f9fafb;
  gap: 12px;
}
 h2 { padding: 0; margin: 0 }

.planner-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.parish-logo {
      width: 120px;
    height: auto;
    object-fit: contain;
    margin-right: 20px;
    margin-left: 10px;
    margin-top: 20px;
    margin-bottom: 20px;
}

#parishName {
  font-size: 1.65rem;
  letter-spacing: 0.05em;
  font-weight: 700;
  color: #111827; margin-bottom: 5px
}

#plannerTitle {
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 0.10em;
  color: #374151;
}

.planner-header-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.month-label {
  font-size: 0.65rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: #6b7280;
}

.month-year-big {
  font-size: 2.25rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: #1f2b5b;
}

.month-nav {
  display: flex;
  gap: 4px;
}

.nav-btn {
  border: none;
  background: #6b6867;
  color: #fff;
  border-radius: 4px;
  width: 24px;
  height: 24px;
  cursor: pointer;
  font-size: 0.8rem;
}
.nav-btn:hover {
  background: #374151;
}

/* LAYOUT PRINCIPAL */

.planner-main {
  display: grid;
  grid-template-columns: 3fr 1.1fr;
  border-top: 1px solid #d1d5db;
}

@media (max-width: 900px) {
  .planner-main {
    grid-template-columns: 1fr;
  }
}

/* CALENDARIO */

.calendar-wrapper {
  padding: 16px 16px 20px 16px;
}

.weekdays-row {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-size: 0.75rem;
  font-weight: 700;
  background: #1f2b5b;
  color: #ffffff;
  border-radius: 4px 4px 0 0;
  overflow: hidden;
}

.weekdays-row > div {
  padding: 10px 10px;
  border-right: 2px solid #fff;
}
.weekdays-row > div:last-child {
  border-right: none;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  border: 1px solid #9ca3af;
  border-top: none;
}

/* CADA DÍA */

.day-cell {
  min-height: 110px;
  border-right: 1px solid #d1d5db;
  border-bottom: 1px solid #d1d5db;
  padding: 6px 4px 8px 4px;
  display: flex;
  flex-direction: column;
  font-size: 0.7rem;
  cursor: pointer;
  background: #ffffff;
}

.day-cell:nth-child(7n) {
  border-right: none;
}

.day-cell.empty {
  background: #f9fafb;
  cursor: default;
}

.day-header {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  margin-bottom: 4px;
}

.day-number {
  font-weight: 700;
  font-size: 0.85rem;
}

/* Eventos dentro de cada día */

.day-events {
  margin-top: 4px;
  padding-left: 0;
}

.day-events li {
  list-style: none;
  font-size: 0.7rem;
  padding: 2px 4px;
  border-radius: 6px;
  margin-bottom: 2px;
}

/* Día de hoy y seleccionado */

.today {
  background: #eff6ff;
}

.selected {
  box-shadow: inset 0 0 0 2px #1d4ed8;
}

/* PANEL DERECHA */

.editor-panel {
  border-left: 1px solid #d1d5db;
  padding: 16px 16px 20px 16px;
  background: #f9fafb;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

@media (max-width: 900px) {
  .editor-panel {
    border-left: none;
    border-top: 1px solid #d1d5db;
  }
}

.editor-panel h3 {
  font-size: 1.25rem; color: #e86e0a;
  font-weight: 700;
}

/* FORMULARIO */

.event-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 14px;
}

.event-form label {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 0.8rem;
  color: #4b5563;
}

.event-form input,
.event-form textarea,
.event-form select {
  border-radius: 4px;
  border: 1px solid #cbd5f5;
  padding: 6px 8px;
  font-size: 0.8rem;
  background: #ffffff;
  resize: vertical;
}

.event-form input:focus,
.event-form textarea:focus,
.event-form select:focus {
  outline: 2px solid #2563eb;
  outline-offset: 1px;
}

/* Fila del color */

.color-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.color-row label {
  flex: 1;
  font-size: 0.8rem;
}

/* Selector de color sin contorno doble */

.color-row input[type="color"] {
  flex: 0 0 auto;
  width: 40px;
  height: 32px;
  padding: 0;
  border: none;                 /* quitamos borde externo */
  background: transparent;
  cursor: pointer;
  outline: none;
  box-shadow: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

.color-row input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 0;
}

.color-row input[type="color"]::-webkit-color-swatch {
  border-radius: 6px;
  border: 1px solid #cbd5e1;    /* un solo borde limpio */
}

/* BOTONES GRANDES */

.primary-btn,
.danger-btn {
  margin-top: 4px;
  border-radius: 4px;
  border: none;
  padding: 15px 10px;
  font-size: 0.8rem;
  cursor: pointer;
  font-weight: 600;
}

.primary-btn {
  background: #1d4ed8;
  color: #f9fafb;
}
.primary-btn:hover {
  background: #1e40af;
}

.danger-btn {
  background: #b91c1c;
  color: #fee2e2;
}
.danger-btn:hover {
  background: #7f1d1d;
}

/* Lista detallada derecha */

.event-list {
  list-style: none;
  max-height: none;
  overflow-y: auto;
  padding-right: 4px;
}

/* Tarjetas de evento estilo Google Calendar */

.event-item {
  list-style: none;
  border-radius: 14px;
  padding: 12px 14px;
  margin-bottom: 12px;
  box-shadow: 0 2px 4px rgba(15, 23, 42, 0.08);
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
}

.event-row1 {
  font-weight: 600;
}

.event-row2 {
  font-size: 0.85rem;
  opacity: 0.85;
}

/* Botones pequeños dentro de la tarjeta */

.event-buttons-row {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  margin-top: 4px;
}

.small-edit-btn,
.small-danger-btn {
  font-size: 0.7rem;
  border-radius: 999px;
  padding: 4px 10px;
  border: none;
  cursor: pointer;
}

.small-edit-btn {
  background: #dbeafe;
  color: #1d4ed8;
}
.small-edit-btn:hover {
  background: #a7d0fc;
}

.small-danger-btn {
  background: #fee2e2;
  color: #b91c1c;
}
.small-danger-btn:hover {
  background: #fecaca;
}

/* Mensaje vacío */

.empty-msg {
  font-size: 0.75rem;
  color: #6b7280;
}

/* PIE */

.footer-note {
  font-size: 0.7rem;
  color: #6b7280;
  padding: 8px 10px;
  border-top: 1px solid #e5e7eb;
  text-align: right;
}

/* ===== Días de semana: completo en PC, abreviado en móvil ===== */

.weekday {
  position: relative;
}

@media (max-width: 600px) {
  .weekday {
    font-size: 0;
  }

  .weekday::after {
    content: attr(data-short);
    font-size: 0.7rem;
    display: inline-block;
  }

  .weekdays-row {
    font-size: 0.65rem;
  }

  .weekdays-row > div {
    padding: 6px 2px;
  }

  .day-cell {
    min-height: 60px;
    padding: 2px;
    font-size: 0.7rem;
  }

  .day-number {
    font-size: 0.75rem;
  }

  /* AQUÍ ES LA CLAVE:
     en móvil las actividades se ven solo como barras de color,
     sin texto visible */
  .day-events li {
    margin-bottom: 2px;
    padding: 0;
    height: 4px;
    border-radius: 999px;
    font-size: 0;          /* oculta el texto */
    line-height: 0;        /* evita que ‘empuje’ la celda */
  }

  /* Header en dos “filas” */
  .planner-header {
    flex-direction: column;
    align-items: stretch;
    padding: 10px 12px;
    gap: 8px;
  }

  .planner-header-left,
  .planner-header-right {
    width: 100%;
  }

  .planner-header-right {
    align-items: flex-start; margin: 20px 0;
  }

  .month-year-big {
    font-size: 2rem;
  }

  .planner-app {
    width: 100%;
    max-width: 100%;
    border-radius: 0;
    box-shadow: none;
  }

  body {
    padding: 0;
    background: #f3f4f6;
  }

  .calendar-wrapper,
  .editor-panel {
    padding: 12px 14px 18px 14px;
  }
}


/* Que nada se salga por la derecha */

html,
body {
  max-width: 100%;
  overflow-x: hidden;
}
