/* Katettu website: the demo calendar's dialog (assets/js/demo-calendar.js).
   Published as assets/css/demo-calendar.css by the build (transform T7), and only when the build is given the
   owner's Calendly link; site.css is not changed. Colours, radius and the close button follow the delivered design
   (handoff/HANDOFF.md, "Design tokens"; the phone menu's round button). */

/* While the dialog is open the page behind it does not scroll. */
html.kt-dc-lock { overflow: hidden; }

/* The page, dimmed. */
.kt-dc {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  padding: 16px;
  background: rgba(23, 33, 28, 0.6);
  overscroll-behavior: contain;
  animation: kt-dc-dim 0.18s ease-out both;
}

/* The white panel: about 1000 by 760 px on a large screen, never closer than 16 px to an edge. */
.kt-dc-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  width: min(1000px, calc(100vw - 32px));
  height: min(760px, calc(100vh - 32px));
  overflow: hidden;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(38, 45, 42, 0.08), 0 24px 64px rgba(23, 33, 28, 0.28);
  animation: kt-dc-rise 0.22s ease-out both;
}

/* The close button at the top right: a 44 px round button, like the phone menu's. */
.kt-dc-bar {
  flex: none;
  display: flex;
  justify-content: flex-end;
  padding: 10px 10px 0;
}
.kt-dc-close {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid #dde2d9;
  border-radius: 999px;
  background: #ffffff;
  color: #17211c;
  cursor: pointer;
}
/* The cross, drawn as the site's own close icon is (two strokes of about 1.9 px, round ends). */
.kt-dc-close::before,
.kt-dc-close::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 16px;
  height: 1.9px;
  margin: -0.95px 0 0 -8px;
  border-radius: 1px;
  background: currentColor;
  transform: rotate(45deg);
}
.kt-dc-close::after { transform: rotate(-45deg); }

/* The calendar fills the rest of the panel. Until it has loaded, the words behind it show through. */
.kt-dc-body {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
}
.kt-dc-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 24px;
  text-align: center;
  font: 500 16px/1.5 'Albert Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  color: #58635c;
}
.kt-dc-frame {
  position: relative;
  display: block;
  width: 100%;
  min-width: 320px;
  height: 100%;
  border: 0;
}

/* The invisible stop after the calendar that sends Tab back to the close button (demo-calendar.js). */
.kt-dc-edge {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Phones (under 640 px): the whole screen. */
@media (max-width: 639.98px) {
  .kt-dc { padding: 0; }
  .kt-dc-panel {
    width: 100%;
    height: 100%;
    border-radius: 0;
    box-shadow: none;
  }
}

@keyframes kt-dc-dim {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes kt-dc-rise {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .kt-dc,
  .kt-dc-panel { animation: none; }
}
