/* Shared event calendar button and chooser. Prefixes avoid existing club styles. */
a.mcal-button {
  display: inline-block;
  padding: 4px 8px;
  border: 1px solid currentColor;
  border-radius: 4px;
  text-decoration: none;
  white-space: nowrap;
}

dialog.mcal-dialog {
  box-sizing: border-box;
  width: 390px;
  max-width: calc(100% - 24px);
  max-height: calc(100% - 24px);
  margin: auto;
  padding: 20px;
  overflow: auto;
  border: 1px solid #777;
  border-radius: 8px;
  background: #fff;
  color: #222;
  font-family: Helvetica, Arial, sans-serif;
  line-height: 1.4;
  text-align: left;
}

.mcal-dialog::backdrop {
  background: rgba(0, 0, 0, 0.35);
}

.mcal-dialog h2 {
  margin: 0 0 12px;
  font-size: 1.25em;
}

.mcal-event {
  margin: 0 0 16px;
  overflow-wrap: anywhere;
}

.mcal-choices {
  display: grid;
  gap: 8px;
}

.mcal-choices a.mcal-choice {
  display: block;
  padding: 10px 12px;
  border: 1px solid #aaa;
  border-radius: 4px;
  background: #f5f5f5;
  color: #222;
  text-decoration: none;
}

.mcal-choices a.mcal-choice:hover {
  background: #e8e8e8;
}

.mcal-button:focus-visible, .mcal-choice:focus-visible, .mcal-close:focus-visible {
  outline: 3px solid #2465b4;
  outline-offset: 2px;
}

.mcal-note {
  margin: 16px 0;
  font-size: 0.9em;
}

.mcal-close {
  padding: 8px 16px;
  font: inherit;
  cursor: pointer;
}
