/* Shared frame for the official Cal.com inline calendar. */
/* The card takes the ground of Cal.com's free dark booker (#171717), so the calendar reads as part of the card rather
   than a panel inside it; a fine gold edge and two gold rules (under the heading, over the footer) tie it to the site. */
.sched.cal-booking {
  --cal-ground: #171717;
  --cal-rule: rgba(201, 165, 112, .16);
  grid-column: 2;
  position: relative;
  min-width: 0;
  display: grid;
  gap: 16px;
  padding: 20px 16px 14px;
  border-radius: var(--r-lg);
  color: var(--paper);
  background: var(--cal-ground);
  box-shadow: var(--shadow-dark-2), inset 0 0 0 1px rgba(201, 165, 112, .34);
}

/* The header: the heading and the new-tab link on one line (the link comes before the calendar, so the keyboard reaches
   it without stepping through every day), then the call's length, format and the visitor's time zone. */
.cal-booking__header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 4px 16px;
  padding: 6px 10px 14px;
  border-bottom: 1px solid var(--cal-rule);
}
.cal-booking .sched__h { grid-column: 1; grid-row: 1; }
.cal-booking__meta { grid-column: 1 / -1; grid-row: 2; margin: 0; color: var(--on-dark-2); }
.cal-booking__header .cal-booking__link { grid-column: 2; grid-row: 1; justify-self: end; gap: 6px; }
.cal-booking__link svg { width: 10px; height: 10px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.cal-booking .sched__h {
  margin: 0;
  font: 500 clamp(28px, 2.4vw, 36px)/1.1 var(--display);
}

.cal-booking__embed {
  width: 100%;
  min-width: 0;
  height: auto;
}
.cal-booking__embed iframe {
  display: block;
  width: 100%;
  max-width: 100%;
  border: 0;
  color-scheme: dark;
}

.cal-booking__footer {
  border-top: 1px solid var(--cal-rule);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 20px;
  padding: 10px 10px 0;
}
/* Once the calendar is in, the footer has nothing to say; it returns only for loading and for a calendar that will not load. */
.cal-booking__footer:has(> .cal-booking__status:empty) { display: none; }
.cal-booking__status {
  flex: 1 1 220px;
  margin: 0;
  color: var(--on-dark-2);
  font: 400 13px/1.6 var(--sans);
}
.cal-booking__status:empty { display: none; }
.cal-booking__link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--paper);
  font: 500 14px/1.5 var(--sans);
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
}
.cal-booking__link:hover { color: var(--metal); }
.cal-booking__link:focus-visible {
  outline: 2px solid var(--metal);
  outline-offset: 5px;
  border-radius: 3px;
}

/* Cal.com sets the month and the times side by side once its frame is 768px wide, and below that runs a phone-style
   flow with very large days. So beside the intro the card is a fixed 816px (its frame 784px) and the intro takes the rest,
   which keeps "Book an intro call." on one line. Below 1440px that would squeeze the intro, so the two stack: the intro at
   a reading width, the card up to 960px (wide enough for the side-by-side calendar from tablets up). */
#book .book__grid { grid-template-columns: minmax(0, 1fr) 816px; }
#book .book__grid > .book__intro { grid-column: 1; }
@media (max-width: 1439px) {
  #book .book__grid { grid-template-columns: minmax(0, 1fr); }
  #book .book__grid > .book__intro, .sched.cal-booking { grid-column: 1 / -1; }
  #book .book__grid > .book__intro { max-width: 720px; }
  .sched.cal-booking { max-width: 960px; }   /* snug around the calendar, which stops growing at about this width */
}
@media (max-width: 640px) {
  .sched.cal-booking { gap: 12px; padding: 12px 8px 10px; }
  .cal-booking__header { padding: 10px 8px 12px; }
  .cal-booking__footer { padding: 8px 8px 0; }
  .cal-booking__status { flex-basis: 100%; }
}
@media (max-width: 420px) {
  .cal-booking__header { grid-template-columns: minmax(0, 1fr); }
  .cal-booking__header .cal-booking__link { grid-column: 1; grid-row: 3; justify-self: start; min-height: 36px; }
}

/* The native pointer continues inside the third-party iframe. */
@media (hover: hover) and (pointer: fine) {
  .has-cursor:has(.cal-booking:hover) .cursor { opacity: 0; }
}
