/* ==============================================================================
   CALENDAR BLOCK (ADR-062): the Assembly's Google Calendar in a frame,
   on the same paper card as a markdown block.
   ============================================================================== */

.block-calendar {
  background: var(--paper-bg);
  border-radius: var(--radius-lg);
  padding: var(--spacing-xl);
  box-shadow: var(--shadow-sm);
}

.calendar__intro {
  max-width: var(--content-max-width);
  margin: 0 0 var(--spacing-md);
  color: var(--text-secondary);
  line-height: 1.7;
}

/* The frame takes the whole column and a fixed height: Google draws a
   month grid at whatever size it is given, so there is no aspect ratio to
   reserve the box with, and a height in rem keeps the grid's rows readable
   whether the column is 40 or 60 rem wide. The border radius is on the
   wrapper, with overflow hidden, because the <iframe> itself has square
   corners and a frame cannot be styled from outside. The light background
   shows while Google is still loading, instead of a hole in the card. */
.calendar__frame {
  overflow: hidden;
  border-radius: var(--radius-md);
  background: var(--paper-secondary-bg);
}

.calendar__frame iframe {
  display: block;
  width: 100%;
  height: 38rem;
  border: 0;
}

/* On a phone the month grid is too cramped to read; Google's own layout
   switches to a list inside the frame once it is narrow enough, and a
   taller box gives that list room without a second scrollbar. */
@media (max-width: 767px) {
  .calendar__frame iframe {
    height: 32rem;
  }
}

.calendar__open {
  margin: var(--spacing-md) 0 0;
}
