/* Calendar page, from fplk-calendario.html. Scoped so the rest of the theme stays as it is. */

.cal-page {
  --g950: #060f08;
  --g900: #0b1a0f;
  --g800: #0f2816;
  --g700: #143a1f;
  --g600: #1b6b3a;
  --g400: #34a85c;
  --g300: #6fbf8a;
  --r500: #c91f30;
  --au500: #c9a84c;
  --page: var(--g950);
  --ink: #e3f1e7;
  --muted: #9fbfa8;
  --line: rgba(111, 191, 138, 0.14);
  --card: var(--g800);
  --max: 1240px;
  --pad: max(5vw, 20px);
  background: var(--page);
  color: var(--ink);
  font-family: var(--fplk-font-sans, "Inter", system-ui, sans-serif);
}

[data-theme="light"] .cal-page {
  --page: #fff;
  --ink: var(--g800);
  --muted: #3f6b4a;
  --line: rgba(27, 107, 58, 0.14);
  --card: #fff;
}

.cal-page .entry-header {
  position: relative;
  background: var(--g950);
  color: #d4eddc;
  overflow: hidden;
  isolation: isolate;
}

.cal-page .entry-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(60% 140% at 100% 0%, rgba(27, 107, 58, 0.28), transparent 70%);
}

.cal-page .entry-header-in {
  max-width: calc(var(--max) + 2 * var(--pad));
  margin: auto;
  padding: 48px var(--pad) 72px;
}

.cal-page .crumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 0 0 24px;
  padding: 0;
  font-size: 13px;
  color: #9fbfa8;
}

.cal-page .crumbs li + li::before {
  content: "/";
  margin-right: 8px;
  opacity: 0.5;
}

.cal-page .crumbs a {
  color: inherit;
  text-decoration: none;
}

.cal-page .crumbs a:hover {
  color: #fff;
  text-decoration: underline;
}

.cal-page .crumbs [aria-current] {
  color: #e3f1e7;
}

.cal-page .entry-title {
  margin: 0;
  max-width: 18ch;
  font-family: var(--fplk-font-display, "Space Grotesk", system-ui, sans-serif);
  font-size: clamp(36px, 5.5vw, 64px);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.02;
  color: #f2f8f4;
}

.cal-page .entry-lead {
  max-width: 58ch;
  margin: 20px 0 0;
  font-size: clamp(17px, 1.5vw, 19px);
  line-height: 1.6;
  color: #b8d2c0;
}

.cal-page .hero-flag {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 4px;
  display: flex;
}

.cal-page .hero-flag .fg {
  flex: 0.4;
  background: var(--g600);
}

.cal-page .hero-flag .fr {
  flex: 0.6;
  background: var(--r500);
}

.cal-page .page-body {
  background: var(--page);
  padding: 64px var(--pad) 96px;
}

.cal-page .cal-wrap {
  max-width: var(--max);
  margin: auto;
}

.cal-page .filters {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: end;
}

.cal-page .flt {
  display: grid;
  gap: 6px;
}

.cal-page .flt label {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

.cal-page .flt select {
  width: 100%;
  min-height: 48px;
  padding: 0 36px 0 14px;
  border-radius: 8px;
  border: 1px solid rgba(111, 191, 138, 0.28);
  background: var(--page) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2334a85c' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center / 14px;
  color: var(--ink);
  font: 500 15px var(--fplk-font-sans, "Inter", system-ui, sans-serif);
  appearance: none;
}

[data-theme="light"] .cal-page .flt select {
  border-color: #c9d9cd;
  background-color: #fafcfb;
}

.cal-page .clear {
  display: inline-flex;
  align-items: center;
  margin-top: 0;
  min-height: 32px;
  padding: 0 4px;
  border: 0;
  background: none;
  color: var(--muted);
  font: 500 14px var(--fplk-font-sans, "Inter", system-ui, sans-serif);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.cal-page .filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 14px;
}

.cal-page .pdf {
  display: inline-flex;
  align-items: center;
  margin-left: auto;
  min-height: 40px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  background: var(--g600);
  color: #fff;
  font: 600 14px var(--fplk-font-sans, "Inter", system-ui, sans-serif);
  cursor: pointer;
}

.cal-page .pdf:hover {
  background: var(--g700);
}

.cal-page .clear:hover {
  color: var(--ink);
}

.cal-page .legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 22px 0 4px;
}

.cal-page .legend > span {
  flex: 0 0 100%;
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

.cal-page .lg,
.cal-page .lg i,
.cal-page .flt select,
.cal-page .more {
  cursor: pointer;
}

.cal-page .lg {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 14px 0 10px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--ink) 18%, var(--page));
  background: color-mix(in srgb, var(--c) 22%, color-mix(in srgb, var(--ink) 5%, var(--page)));
  color: var(--ink);
  font: 500 14px var(--fplk-font-sans, "Inter", system-ui, sans-serif);
  text-decoration: none;
}

.cal-page .lg i {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  border-radius: 50%;
  background: var(--c);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, #111 45%, var(--c));
}

.cal-page .lg[style*="--c:transparent"],
.cal-page .lg[style*="--c: transparent"] {
  background: color-mix(in srgb, var(--ink) 5%, var(--page));
}

.cal-page .lg[style*="--c:transparent"] i,
.cal-page .lg[style*="--c: transparent"] i {
  background: none;
  box-shadow: inset 0 0 0 1.5px var(--muted);
}

.cal-page .lg:hover {
  border-color: color-mix(in srgb, var(--c) 55%, var(--ink));
}

.cal-page .lg[aria-pressed="true"] {
  border-color: color-mix(in srgb, var(--c) 70%, var(--ink));
  background: color-mix(in srgb, var(--c) 34%, var(--page));
  font-weight: 650;
}

.cal-page .lg[style*="--c:transparent"][aria-pressed="true"],
.cal-page .lg[style*="--c: transparent"][aria-pressed="true"] {
  border-color: var(--ink);
  background: color-mix(in srgb, var(--muted) 16%, var(--page));
}

.cal-page .count {
  margin: 16px 0 0;
  font-size: 14px;
  color: var(--muted);
}

.cal-page .month {
  margin-top: 48px;
}

.cal-page .month-h {
  position: sticky;
  top: 76px;
  z-index: 5;
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 14px 0;
  background: var(--page);
  border-bottom: 1px solid var(--line);
}

.cal-page .month-h h2 {
  margin: 0;
  font-family: var(--fplk-font-display, "Space Grotesk", system-ui, sans-serif);
  font-size: clamp(26px, 3vw, 36px);
  font-weight: 700;
  letter-spacing: -0.8px;
  line-height: 1.1;
}

.cal-page .month-h h2 span {
  color: var(--muted);
  font-weight: 500;
}

.cal-page .month-h small {
  margin-left: auto;
  font-size: 13px;
  color: var(--muted);
}

.cal-page .cols {
  display: none;
}

.cal-page .ev-list {
  display: grid;
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
}

.cal-page .ev {
  --c: transparent;
  position: relative;
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 4px 14px;
  padding: 18px 0 18px 22px;
  border-bottom: 1px solid var(--line);
}

.cal-page .ev::before {
  content: "";
  position: absolute;
  left: 0;
  top: 18px;
  bottom: 18px;
  width: 4px;
  border-radius: 4px;
  background: var(--c);
}

.cal-page .ev.nocat::before {
  background: var(--line);
}

.cal-page .ev:hover {
  background: rgba(127, 127, 127, 0.04);
}

.cal-page .ev-date {
  grid-row: span 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.cal-page .ev-date b {
  font: 600 22px/1.05 var(--fplk-font-display, "Space Grotesk", system-ui, sans-serif);
  letter-spacing: -0.5px;
  white-space: nowrap;
}

.cal-page .ev-date small {
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
  text-transform: capitalize;
}

.cal-page .ev-title {
  align-self: end;
  font: 600 18px/1.3 var(--fplk-font-display, "Space Grotesk", system-ui, sans-serif);
}

.cal-page .ev-place {
  align-self: start;
  font-size: 14px;
  color: var(--muted);
}

.cal-page .ev-place a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cal-page .ev-place .pin {
  width: 39px;
  height: 39px;
  flex: 0 0 39px;
  color: var(--fplk-verm-400);
}

.cal-page .ev-place a:hover {
  color: var(--g400);
}

.cal-page .ev-place .country {
  display: inline;
}

.cal-page .ev-place .country::before {
  content: " · ";
}

.cal-page .ev-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.cal-page .more {
  display: inline-flex;
  align-items: center;
  margin-top: 8px;
  color: var(--g300);
  font-size: 14px;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.cal-page .more::after {
  content: "→";
  margin-left: 6px;
  text-decoration: none;
}

[data-theme="light"] .cal-page .more {
  color: var(--g600);
}

.cal-page .more:hover {
  color: var(--g400);
}

.cal-page .tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  cursor: default;
}

.cal-page .tag.cat {
  background: var(--c);
  color: var(--on, #fff);
}

.cal-page .st {
  background: rgba(127, 127, 127, 0.18);
  color: var(--muted);
}

.cal-page .st.now {
  background: var(--au500);
  color: var(--g950);
}

.cal-page .st.next {
  background: var(--g600);
  color: #fff;
}

.cal-page .ev.past {
  opacity: 0.5;
}

.cal-page .ev.past:hover {
  opacity: 0.85;
}

.cal-page .empty {
  margin-top: 32px;
  padding: 48px 24px;
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: 12px;
  color: var(--muted);
}

@media (min-width: 900px) {
  .cal-page .filters {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .cal-page .cols {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr) 220px 140px;
    gap: 0 24px;
    padding: 12px 0 4px 22px;
    font-size: 13px;
    color: var(--muted);
  }

  .cal-page .ev {
    grid-template-columns: 120px minmax(0, 1fr) 220px 140px;
    gap: 0 24px;
    align-items: center;
    padding: 20px 0 20px 22px;
  }

  .cal-page .ev-date {
    grid-row: auto;
  }

  .cal-page .ev-title {
    align-self: center;
  }

  .cal-page .ev-place {
    display: contents;
    font-size: 15px;
    color: var(--ink);
  }

  .cal-page .ev-place .country::before {
    content: none;
  }

  .cal-page .ev-place .country {
    color: var(--muted);
  }
}
