/* Calendar Module — Card + Buttons
   - Solid calendar buttons with auto-darken hover; text color unchanged; no hover glow
   - Newsletter button: outline on white; border + text color = calendar button bg
   - Accessible :focus-visible ring (keyboard only)
*/

.calendar-module {
  /* Defaults overridden per-instance by inline variables from PHP */
  --cm-btn-bg: #2D7BD6; /* calendar buttons bg (and newsletter outline color) */
  --cm-btn-text: #fff;  /* calendar buttons text */
  --cm-bg: #fff;        /* card background */

  background: var(--cm-bg);
  border-radius: 16px;
  padding: 20px 22px;
  box-shadow: 0 1px 2px rgba(0,0,0,.05), 0 8px 24px rgba(0,0,0,.06);
  max-width: 460px;
}

.calendar-module__heading {
  margin: 0 0 .75rem;
  font-weight: 600;
  font-size: 1.2rem;
}

.calendar-module__subhead {
  margin-top: 15px;
  font-weight: 600;
  font-size: 1.2rem;
}

.calendar-module__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

/* Base calendar button (solid) */
.calendar-module__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--cm-btn-bg);
  color: var(--cm-btn-text);
  border: 2px solid transparent;
  text-decoration: none;
  font-weight: 600;
  line-height: 1.2;
  transition: background .15s ease, transform .08s ease;
}

/* Solid hover: auto-darken; text unchanged; no glow */
.calendar-module__btn:hover {
  background: color-mix(in srgb, var(--cm-btn-bg) 85%, #000 15%);
  color: var(--cm-btn-text);
}

/* Fallback if color-mix unsupported */
@supports not (background: color-mix(in srgb, #000 10%, #fff)) {
  .calendar-module__btn:hover {
    filter: brightness(0.92);
    color: var(--cm-btn-text);
  }
}

/* -------------------------------------------
   Newsletter outline variant
   Force white background and use the main btn bg
   color for both text and border.
   Use higher specificity so it overrides base.
-------------------------------------------- */

.calendar-module .calendar-module__btn.calendar-module__btn--outline {
  background: #fff;                 /* force white background */
  color: var(--cm-btn-bg);          /* text pulls from main button bg */
  border-color: var(--cm-btn-bg);   /* border pulls from main button bg */
}

/* Outline hover: subtle tint; text stays same; no glow */
.calendar-module .calendar-module__btn.calendar-module__btn--outline:hover {
  background: color-mix(in srgb, var(--cm-btn-bg) 12%, #fff);
  color: var(--cm-btn-bg);
}

/* Accessible keyboard focus (no hover outline) */
.calendar-module__btn:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--cm-btn-bg) 40%, #000);
  outline-offset: 2px;
}

/* Normalize link decoration inside the card */
.calendar-module a { text-decoration: none; }