/* PEA Simple Calendar — Front styles v1.3.0 */

/* Shared */
.pea-cal { border: 1px solid #e5e7eb; border-radius: 8px; overflow: hidden; }
.pea-cal__header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 12px; background: #f3f4f6; font-weight: 600;
}
.pea-cal__title { font-size: 16px; }
.pea-cal__nav { text-decoration: none; padding: 4px 8px; border-radius: 6px; border: 1px solid #e5e7eb; }
.pea-cal__nav:hover { background: #ffffff; }

/* Desktop/tablet month grid */
.pea-cal__grid { width: 100%; border-collapse: collapse; table-layout: fixed; }
.pea-cal__grid th, .pea-cal__grid td { border: 1px solid #e5e7eb; vertical-align: top; }
.pea-cal__grid th { background: #fafafa; padding: 8px; font-weight: 600; text-align: center; }
.pea-cal__cell { height: 110px; padding: 6px; position: relative; }
.pea-cal__cell--empty { background: #fcfcfc; }
.pea-cal__cell--today { outline: 2px solid #2563eb; outline-offset: -2px; }
.pea-cal__daynum { font-weight: 700; font-size: 13px; margin-bottom: 4px; display:inline-block; }
.pea-cal__text { font-size: 13px; line-height: 1.2; max-height: 70px; overflow: auto; display:block; margin-top:2px; }

/* Mobile rows (Mon..Sun) */
.pea-cal-mob { display: none; border-top: 1px solid #e5e7eb; }
.pea-cal-mob__header { display: flex; justify-content: space-between; align-items: center; padding: 8px 12px; background: #fafafa; }
.pea-cal__week-nav { border: 1px solid #e5e7eb; background: #fff; padding: 4px 8px; border-radius: 6px; }
.pea-cal-mob__title { font-weight: 600; }

.pea-cal-mob__viewport { padding: 6px; }
.pea-cal-mob__week { display: none; }
.pea-cal-mob__week.is-active { display: block; }

.pea-cal-mob__row {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 8px;
  padding: 10px 8px;
  border-bottom: 1px solid #e5e7eb;
  align-items: flex-start;
}
.pea-cal-mob__row:last-child { border-bottom: 0; }
.pea-cal-mob__dayname { font-weight: 700; font-size: 14px; line-height: 1.2; color: #111827; white-space: nowrap; }
.pea-cal-mob__daycontent { min-height: 32px; }
.pea-cal-mob__daycontent.is-empty { background: #fcfcfc; border: 1px dashed #e5e7eb; border-radius: 6px; min-height: 32px; padding: 6px; }
.pea-cal-mob .pea-cal__daynum { display:inline-block; font-size:12px; font-weight:700; padding:2px 6px; border:1px solid #e5e7eb; border-radius:999px; margin-right:6px; }
.pea-cal-mob .pea-cal__text { display:inline; font-size:13px; line-height:1.25; }

/* Responsive switches */
@media (max-width: 640px) {
  .pea-cal__grid { display: none !important; } /* hide full month table */
  .pea-cal-mob { display: block; }             /* show mobile rows */
}


/* Ateliers inside days */
.pea-cal__atelier {
  margin-top: 4px;
  font-size: 13px;
  line-height: 1.3;
  padding: 3px 6px;
  border-radius: 4px;
  background: #eef2ff;
  cursor: pointer;
}
.pea-cal__atelier-title {
  font-weight: 600;
}
.pea-cal__atelier-time {
  font-weight: 400;
}

/* Clickable days with ateliers */
.pea-cal__cell[data-has-ateliers="1"],
.pea-cal-mob__daycontent[data-has-ateliers="1"] {
  cursor: pointer;
}

/* Modal styles */
.pea-cal-modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 9999;
}
.pea-cal-modal.is-open {
  display: block;
}
.pea-cal-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.45);
}
.pea-cal-modal__dialog {
  position: relative;
  max-width: 420px;
  margin: 40px auto;
  background: #ffffff;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.25);
}
.pea-cal-modal__close {
  position: absolute;
  top: 8px;
  right: 10px;
  border: 0;
  background: transparent;
  font-size: 20px;
  cursor: pointer;
}
.pea-cal-modal__date {
  margin-bottom: 8px;
  font-weight: 600;
}
.pea-cal-modal__submit {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 4px;
  border: 0;
  background: #2563eb;
  color: #ffffff;
  cursor: pointer;
}
.pea-cal-modal__submit:disabled {
  opacity: 0.6;
  cursor: default;
}
.pea-cal-modal__message {
  margin-top: 8px;
  font-size: 13px;
}
