/* Shared full-screen embed modal (Calendly, Phorest store, etc.) */

.cyw-embed-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10002;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.cyw-embed-modal.is-open {
  display: flex;
}
.cyw-embed-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(26, 46, 34, 0.78);
  backdrop-filter: blur(4px);
}
.cyw-embed-modal__panel {
  position: relative;
  z-index: 1;
  background: var(--linen, #F4EEE0);
  width: 100%;
  max-width: 920px;
  max-height: calc(100vh - 40px);
  border-radius: var(--r, 12px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 64px rgba(26, 46, 34, 0.35);
  border: 1px solid var(--border, rgba(46, 74, 58, 0.12));
}
.cyw-embed-modal__header {
  position: relative;
  padding: 24px 56px 20px 28px;
  border-bottom: 1px solid var(--border, rgba(46, 74, 58, 0.12));
  background: #fff;
  flex-shrink: 0;
}
.cyw-embed-modal__header h2 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 400;
  font-size: clamp(24px, 4vw, 30px);
  color: var(--forest, #2E4A3A);
  margin: 0 0 6px;
  line-height: 1.15;
}
.cyw-embed-modal__header p {
  margin: 0;
  font-size: 14px;
  color: var(--text-mid, #5C524A);
  line-height: 1.5;
}
.cyw-embed-modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--warm-stone, #9C8E7F);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}
.cyw-embed-modal__close:hover {
  background: rgba(46, 74, 58, 0.08);
  color: var(--forest, #2E4A3A);
}
.cyw-embed-modal__body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  background: #fff;
  position: relative;
}
.cyw-embed-modal__frame {
  display: block;
  width: 100%;
  min-width: 320px;
  height: min(680px, calc(100vh - 180px));
  border: 0;
  background: #fff;
}
.cyw-embed-modal__frame.is-hidden {
  display: none;
}
.cyw-embed-modal__embed {
  min-width: 320px;
  height: min(680px, calc(100vh - 180px));
}
.cyw-embed-modal__fallback {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: min(480px, calc(100vh - 180px));
  padding: 48px 32px;
}
.cyw-embed-modal__fallback.is-visible {
  display: flex;
}
.cyw-embed-modal__fallback-icon {
  font-size: 40px;
  margin-bottom: 20px;
  line-height: 1;
}
.cyw-embed-modal__fallback h3 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 400;
  font-size: clamp(24px, 4vw, 28px);
  color: var(--forest, #2E4A3A);
  margin: 0 0 12px;
}
.cyw-embed-modal__fallback p {
  font-size: 15px;
  color: var(--text-mid, #5C524A);
  line-height: 1.65;
  max-width: 420px;
  margin: 0 0 28px;
}
.cyw-embed-modal__fallback-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--forest, #2E4A3A);
  color: var(--linen, #F4EEE0);
  padding: 16px 36px;
  border-radius: 100px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: all 0.25s ease;
}
.cyw-embed-modal__fallback-btn:hover {
  background: var(--forest-mid, #3D6150);
  transform: translateY(-1px);
}

/* Calendly-specific aliases (discovery-call) */
.cyw-calendly-modal { display: none; position: fixed; inset: 0; z-index: 10002; align-items: center; justify-content: center; padding: 20px; }
.cyw-calendly-modal.is-open { display: flex; }
.cyw-calendly-modal__backdrop { position: absolute; inset: 0; background: rgba(26, 46, 34, 0.78); backdrop-filter: blur(4px); }
.cyw-calendly-modal__panel { position: relative; z-index: 1; background: var(--linen, #F4EEE0); width: 100%; max-width: 920px; max-height: calc(100vh - 40px); border-radius: var(--r, 12px); overflow: hidden; display: flex; flex-direction: column; box-shadow: 0 24px 64px rgba(26, 46, 34, 0.35); border: 1px solid var(--border, rgba(46, 74, 58, 0.12)); }
.cyw-calendly-modal__header { position: relative; padding: 24px 56px 20px 28px; border-bottom: 1px solid var(--border, rgba(46, 74, 58, 0.12)); background: #fff; flex-shrink: 0; }
.cyw-calendly-modal__header h2 { font-family: 'Cormorant Garamond', serif; font-weight: 400; font-size: clamp(24px, 4vw, 30px); color: var(--forest, #2E4A3A); margin: 0 0 6px; line-height: 1.15; }
.cyw-calendly-modal__header p { margin: 0; font-size: 14px; color: var(--text-mid, #5C524A); line-height: 1.5; }
.cyw-calendly-modal__close { position: absolute; top: 16px; right: 16px; width: 40px; height: 40px; border: 0; border-radius: 50%; background: transparent; color: var(--warm-stone, #9C8E7F); font-size: 28px; line-height: 1; cursor: pointer; transition: background 0.2s ease, color 0.2s ease; }
.cyw-calendly-modal__close:hover { background: rgba(46, 74, 58, 0.08); color: var(--forest, #2E4A3A); }
.cyw-calendly-modal__body { flex: 1; min-height: 0; overflow: auto; -webkit-overflow-scrolling: touch; background: #fff; }
#cyw-calendly-embed { min-width: 320px; height: min(680px, calc(100vh - 180px)); }

@media (max-width: 700px) {
  .cyw-embed-modal,
  .cyw-calendly-modal {
    padding: 0;
  }
  .cyw-embed-modal__panel,
  .cyw-calendly-modal__panel {
    max-width: 100%;
    max-height: 100%;
    height: 100%;
    border-radius: 0;
    border: 0;
  }
  .cyw-embed-modal__header,
  .cyw-calendly-modal__header {
    padding: 20px 52px 16px 20px;
  }
  .cyw-embed-modal__frame,
  .cyw-embed-modal__embed,
  #cyw-calendly-embed {
    height: calc(100vh - 120px);
  }
  .cyw-embed-modal__fallback {
    min-height: calc(100vh - 120px);
    padding: 40px 24px;
  }
  .cyw-embed-modal__fallback-btn {
    width: 100%;
  }
}
