/* Calendar-Widget — Mirror-only static replacement for disabled Elfsight Event Calendar */

.cal-widget {
  width: 100%;
  font-family: inherit;
  display: flex;
  flex-direction: column;
  gap: 3em;
}

.cal-widget__section-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0 0 1.25em 0;
  color: #1a1a1a;
  letter-spacing: 0.01em;
}

.cal-widget__year-group {
  margin-bottom: 2em;
}

.cal-widget__year-group:last-child {
  margin-bottom: 0;
}

.cal-widget__year-title {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #999;
  margin: 0 0 0.85em 0.25em;
}

.cal-widget__list {
  display: flex;
  flex-direction: column;
  gap: 0.75em;
  list-style: none;
  padding: 0;
  margin: 0;
}

.cal-widget__item {
  display: flex;
  align-items: stretch;
  background: #fff;
  border: 1px solid #e8e6e1;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  overflow: hidden;
  text-align: left;
  font: inherit;
  color: inherit;
  width: 100%;
  padding: 0;
}

.cal-widget__item:hover {
  transform: translateY(-2px);
  border-color: #c9a063;
  box-shadow: 0 10px 28px rgba(20, 20, 20, 0.08);
}

.cal-widget__date {
  flex: 0 0 7em;
  background: linear-gradient(135deg, #d4ae6e 0%, #b8924b 100%);
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.25em 0.5em;
  text-align: center;
  position: relative;
  gap: 0.15em;
}

.cal-widget__date-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1;
  gap: 0.4em;
}

.cal-widget__date-month {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  opacity: 0.92;
  margin: 0;
}

.cal-widget__date-day {
  font-size: 1.85rem;
  font-weight: 700;
  line-height: 1;
}

/* Range, same month — compact "MAI 15–16" */
.cal-widget__date--range .cal-widget__date-days {
  display: flex;
  align-items: baseline;
  gap: 0.15em;
  font-size: 1.85rem;
  font-weight: 700;
  line-height: 1;
}

.cal-widget__date-day-sep {
  font-weight: 400;
  opacity: 0.65;
}

/* Range, multi-month — two stacked blocks "OKT 30 → NOV 1" */
.cal-widget__date--multi-month {
  flex-direction: row;
  gap: 0.55em;
  padding: 0.85em 0.5em;
}

.cal-widget__date--multi-month .cal-widget__date-block {
  gap: 0.3em;
}

.cal-widget__date--multi-month .cal-widget__date-day {
  font-size: 1.3rem;
}

.cal-widget__date-sep {
  align-self: center;
  font-size: 1rem;
  opacity: 0.6;
  font-weight: 300;
}

.cal-widget__body {
  flex: 1;
  padding: 1.15em 1.5em;
  display: flex;
  flex-direction: column;
  gap: 0.5em;
  justify-content: center;
  min-width: 0;
}

.cal-widget__title {
  font-size: 1rem;
  font-weight: 700;
  margin: 0;
  line-height: 1.4;
  color: #1a1a1a;
  white-space: pre-line;
}

.cal-widget__subtitle {
  font-size: 0.88rem;
  margin: 0;
  color: #555;
  line-height: 1.4;
}

.cal-widget__location {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  font-size: 0.82rem;
  color: #777;
  margin: 0.1em 0 0;
}

.cal-widget__location svg {
  width: 0.95em;
  height: 0.95em;
  flex-shrink: 0;
}

/* Past: muted but not depressing */
.cal-widget__section--past .cal-widget__date {
  background: linear-gradient(135deg, #a8a8a8 0%, #888 100%);
}

.cal-widget__section--past .cal-widget__item {
  border-color: #ececec;
}

.cal-widget__section--past .cal-widget__title {
  color: #444;
  font-weight: 600;
}

.cal-widget__section--past .cal-widget__item:hover {
  border-color: #999;
}

/* Modal */
.cal-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5em;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.cal-modal.is-open {
  display: flex;
}

.cal-modal__dialog {
  background: #fff;
  max-width: 640px;
  width: 100%;
  border-radius: 8px;
  padding: 2.5em 2.5em 2.25em;
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.25);
}

.cal-modal__close {
  position: absolute;
  top: 1em;
  right: 1em;
  width: 2.4em;
  height: 2.4em;
  border-radius: 999px;
  background: #f0f0f0;
  border: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #555;
  transition: background 0.2s ease;
}

.cal-modal__close:hover {
  background: #ddd;
}

.cal-modal__close svg {
  width: 1.1em;
  height: 1.1em;
}

.cal-modal__title {
  font-size: 1.35rem;
  font-weight: 700;
  margin: 0 0 1.5em 0;
  text-align: center;
  line-height: 1.35;
  white-space: pre-line;
  padding: 0 1.5em 1.5em;
  border-bottom: 1px solid #eee;
}

.cal-modal__section {
  margin: 1.5em 0;
}

.cal-modal__label {
  display: flex;
  align-items: center;
  gap: 0.5em;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #1a1a1a;
  margin: 0 0 0.6em 0;
}

.cal-modal__label svg {
  width: 1em;
  height: 1em;
}

.cal-modal__date {
  font-size: 1rem;
  margin: 0 0 0.5em 0;
  color: #333;
}

.cal-modal__add {
  font-size: 0.92rem;
  color: #3b7cbf;
  text-decoration: none;
}

.cal-modal__add:hover {
  text-decoration: underline;
}

.cal-modal__external-link {
  display: inline-block;
  font-size: 0.92rem;
  color: #3b7cbf;
  text-decoration: none;
  word-break: break-all;
  line-height: 1.4;
}

.cal-modal__external-link:hover {
  text-decoration: underline;
}

.cal-modal__share {
  display: flex;
  gap: 0.75em;
  flex-wrap: wrap;
}

.cal-modal__share-btn {
  flex: 1 1 220px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6em;
  padding: 0.85em 1em;
  border: 1px solid #ccc;
  background: #fff;
  color: #1a1a1a;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 4px;
  cursor: pointer;
  text-decoration: none;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.cal-modal__share-btn:hover {
  border-color: #1a1a1a;
}

.cal-modal__share-btn svg {
  width: 1em;
  height: 1em;
}

.cal-modal__copy.is-copied {
  border-color: #4caf50;
  color: #4caf50;
}

@media (max-width: 600px) {
  .cal-widget__item {
    flex-direction: column;
  }
  .cal-widget__date {
    flex: 0 0 auto;
    padding: 0.85em 0.5em;
    flex-direction: row;
    gap: 0.5em;
  }
  .cal-widget__date-block {
    flex-direction: row;
    gap: 0.4em;
    align-items: baseline;
  }
  .cal-widget__date-day {
    font-size: 1.3rem;
  }
  .cal-widget__date--range .cal-widget__date-days {
    font-size: 1.3rem;
  }
  .cal-modal__dialog {
    padding: 2em 1.5em 1.5em;
  }
  .cal-modal__title {
    font-size: 1.1rem;
    padding: 0 1em 1em;
  }
}
