/* LMYC Class Guide — free forever on-site assistant */

.lmyc-class-guide-fab {
  --lmyc-ai-fab-size: 4.4rem;
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  z-index: 210;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--lmyc-ai-fab-size);
  height: var(--lmyc-ai-fab-size);
  min-width: var(--lmyc-ai-fab-size);
  min-height: var(--lmyc-ai-fab-size);
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background:
    radial-gradient(circle at 32% 28%, rgba(255, 255, 255, 0.42) 0%, transparent 42%),
    linear-gradient(145deg, #5a7348 0%, #425936 48%, #d18e95 100%);
  cursor: pointer;
  isolation: isolate;
  line-height: 0;
  box-shadow:
    0 4px 20px rgba(0, 0, 0, 0.18),
    0 0 0 1px rgba(255, 255, 255, 0.08) inset;
  transition:
    transform 0.28s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.28s ease;
}

.lmyc-class-guide-fab:hover,
.lmyc-class-guide-fab:focus-visible {
  transform: translateY(-3px) scale(1.04);
  box-shadow:
    0 10px 28px rgba(48, 61, 28, 0.32),
    0 0 0 1px rgba(255, 255, 255, 0.12) inset;
  outline: none;
}

.lmyc-class-guide-fab:active {
  transform: translateY(-1px) scale(0.98);
}

.lmyc-class-guide-fab__glow {
  position: absolute;
  inset: -18%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(209, 142, 149, 0.38) 0%, transparent 68%);
  z-index: -1;
  animation: lmyc-ai-fab-pulse 2.8s ease-in-out infinite;
  pointer-events: none;
}

.lmyc-class-guide-fab__ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.28);
  pointer-events: none;
}

.lmyc-class-guide-fab__icon {
  width: 1.75rem;
  height: 1.75rem;
  display: block;
  flex-shrink: 0;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.18));
  pointer-events: none;
}

.lmyc-class-guide-fab__diamond {
  transform-origin: 24px 24px;
  animation: lmyc-ai-fab-shimmer 3.6s ease-in-out infinite;
}

.lmyc-class-guide-fab__spark {
  opacity: 0.92;
}

.lmyc-class-guide-fab__spark--a {
  animation: lmyc-ai-fab-twinkle 2.2s ease-in-out infinite;
  transform-origin: 37px 15px;
}

.lmyc-class-guide-fab__spark--b {
  animation: lmyc-ai-fab-twinkle 2.2s ease-in-out 1.1s infinite;
  transform-origin: 11px 36px;
}

@keyframes lmyc-ai-fab-pulse {
  0%,
  100% {
    opacity: 0.55;
    transform: scale(0.92);
  }
  50% {
    opacity: 1;
    transform: scale(1.08);
  }
}

@keyframes lmyc-ai-fab-shimmer {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.88;
    transform: scale(1.06);
  }
}

@keyframes lmyc-ai-fab-twinkle {
  0%,
  100% {
    opacity: 0.35;
    transform: scale(0.7);
  }
  50% {
    opacity: 1;
    transform: scale(1.15);
  }
}

.lmyc-class-guide-fab[hidden],
.lmyc-class-guide-panel[hidden] {
  display: none !important;
}

.lmyc-class-guide-panel {
  position: fixed;
  right: 1.25rem;
  bottom: calc(1.5rem + 4.4rem + 0.75rem + 4.4rem + 0.75rem);
  z-index: 220;
  display: flex;
  flex-direction: column;
  width: min(100vw - 1.5rem, 32rem);
  height: min(82vh, 44rem);
  max-height: calc(100vh - 8.5rem);
  overflow: hidden;
  border-radius: 1.35rem;
  background: #fffdfb;
  border: 2px solid rgba(209, 142, 149, 0.28);
  box-shadow: 0 24px 64px rgba(47, 61, 40, 0.18);
  font-family: inherit;
  color: #171717;
}

.lmyc-class-guide-panel__head {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 1.1rem 1.15rem;
  background: linear-gradient(135deg, #425936 0%, #35482c 100%);
  color: #fff;
}

.lmyc-class-guide-panel__avatar {
  width: 2.85rem;
  height: 2.85rem;
  border-radius: 999px;
  object-fit: contain;
  background: #f7e2c5;
  padding: 0.25rem;
  flex-shrink: 0;
}

.lmyc-class-guide-panel__title {
  margin: 0;
  font-family: var(--font-heading-family, "Cormorant Garamond", Georgia, serif);
  font-size: 1.55rem;
  font-weight: 500;
  line-height: 1.15;
}

.lmyc-class-guide-panel__sub {
  margin: 0.2rem 0 0;
  font-size: 0.88rem;
  opacity: 0.85;
}

.lmyc-class-guide-panel__close {
  margin-left: auto;
  width: 2.2rem;
  height: 2.2rem;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}

.lmyc-class-guide-panel__close:hover,
.lmyc-class-guide-panel__close:focus-visible {
  background: rgba(255, 255, 255, 0.24);
  outline: none;
}

.lmyc-class-guide-panel__messages {
  flex: 1;
  overflow-y: auto;
  padding: 1.15rem 1.15rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  background:
    radial-gradient(ellipse 80% 50% at 100% 0%, rgba(209, 142, 149, 0.08), transparent 55%),
    linear-gradient(180deg, #fffdfb 0%, #f7f1ea 100%);
}

.lmyc-class-guide-msg {
  max-width: 95%;
  padding: 0.9rem 1.05rem;
  border-radius: 1.1rem;
  font-size: 1.05rem;
  line-height: 1.55;
}

.lmyc-class-guide-msg--bot {
  align-self: flex-start;
  background: #fff;
  border: 1px solid rgba(66, 89, 54, 0.12);
  color: #303d1c;
  border-bottom-left-radius: 0.35rem;
}

.lmyc-class-guide-msg--user {
  align-self: flex-end;
  background: #425936;
  color: #fff;
  border-bottom-right-radius: 0.35rem;
}

.lmyc-class-guide-msg a {
  color: #a85f68;
  font-weight: 600;
  text-underline-offset: 0.15em;
}

.lmyc-class-guide-msg--user a {
  color: #f7e2c5;
}

.lmyc-class-guide-msg--typing {
  opacity: 0.72;
  font-style: italic;
}

.lmyc-class-guide-msg__note {
  display: block;
  margin-top: 0.55rem;
  font-size: 0.85rem;
  line-height: 1.45;
  color: rgba(48, 61, 28, 0.65);
}

.lmyc-class-guide-suggest {
  display: grid;
  gap: 0.55rem;
  margin: 0.75rem 0 0.35rem;
}

.lmyc-class-guide-suggest__card {
  display: block;
  padding: 0.75rem 0.9rem;
  border-radius: 0.85rem;
  background: rgba(66, 89, 54, 0.06);
  border: 1.5px solid rgba(66, 89, 54, 0.16);
  color: #303d1c;
  text-decoration: none;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.lmyc-class-guide-suggest__card:hover,
.lmyc-class-guide-suggest__card:focus-visible {
  background: rgba(209, 142, 149, 0.12);
  border-color: rgba(209, 142, 149, 0.45);
  outline: none;
}

.lmyc-class-guide-suggest__name {
  display: block;
  font-weight: 700;
  font-size: 1.05rem;
  color: #425936;
  margin-bottom: 0.2rem;
}

.lmyc-class-guide-suggest__blurb {
  display: block;
  font-size: 0.92rem;
  line-height: 1.45;
  color: rgba(23, 23, 23, 0.72);
}

.lmyc-class-guide-suggest__cta {
  display: inline-block;
  margin-top: 0.45rem;
  font-size: 0.88rem;
  font-weight: 700;
  color: #a85f68;
}

.lmyc-class-guide-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0 1.1rem 0.85rem;
  background: #f7f1ea;
}

.lmyc-class-guide-chip {
  appearance: none;
  border: 1.5px solid rgba(66, 89, 54, 0.22);
  background: #fff;
  color: #425936;
  border-radius: 999px;
  padding: 0.55rem 0.95rem;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.lmyc-class-guide-chip:hover,
.lmyc-class-guide-chip:focus-visible {
  background: #425936;
  border-color: #425936;
  color: #fff;
  outline: none;
}

.lmyc-class-guide-panel__form {
  display: flex;
  gap: 0.55rem;
  padding: 0.9rem 1rem 1rem;
  border-top: 1px solid rgba(66, 89, 54, 0.12);
  background: #fff;
}

.lmyc-class-guide-panel__input {
  flex: 1;
  min-width: 0;
  border: 1.5px solid rgba(66, 89, 54, 0.18);
  border-radius: 999px;
  padding: 0.85rem 1.1rem;
  font: inherit;
  font-size: 1rem;
  background: #fffdfb;
  color: #171717;
}

.lmyc-class-guide-panel__input:focus {
  outline: none;
  border-color: #d18e95;
  box-shadow: 0 0 0 3px rgba(209, 142, 149, 0.18);
}

.lmyc-class-guide-panel__send {
  flex-shrink: 0;
  border: 0;
  border-radius: 999px;
  padding: 0 1.25rem;
  background: #d18e95;
  color: #fff;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
}

.lmyc-class-guide-panel__send:hover,
.lmyc-class-guide-panel__send:focus-visible {
  background: #D18E95;
  outline: none;
}

body.lmyc-class-guide-open {
  overflow: hidden;
}

@media screen and (max-width: 749px) {
  .lmyc-class-guide-fab {
    --lmyc-ai-fab-size: 4rem;
    right: 1rem;
    bottom: 1rem;
  }

  .lmyc-class-guide-fab__icon {
    width: 1.5rem;
    height: 1.5rem;
  }

  .lmyc-class-guide-panel {
    right: 0.5rem;
    left: 0.5rem;
    bottom: calc(1rem + 4rem + 0.7rem + 4rem + 0.7rem);
    width: auto;
    height: min(78vh, 40rem);
    max-height: calc(100vh - 9.5rem);
  }

  .lmyc-class-guide-nudge {
    right: 1rem;
    bottom: calc(1rem + 4rem + 0.7rem + 4rem + 0.85rem);
    max-width: calc(100vw - 6.5rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  .lmyc-class-guide-fab,
  .lmyc-class-guide-fab__glow,
  .lmyc-class-guide-fab__diamond,
  .lmyc-class-guide-fab__spark--a,
  .lmyc-class-guide-fab__spark--b,
  .lmyc-class-guide-nudge {
    animation: none;
    transition: none;
  }
}

/* Idle nudge removed — keep hidden for cached markup */
.lmyc-class-guide-nudge {
  display: none !important;
  position: fixed;
  right: calc(1.5rem + 4.4rem + 0.85rem);
  /* Align with AI FAB (middle of stack) */
  bottom: calc(1.5rem + 4.4rem + 0.75rem + 0.55rem);
  z-index: 215;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  max-width: min(18rem, calc(100vw - 7.5rem));
  padding: 0.85rem 1rem;
  border-radius: 1rem;
  background: #fffdfb;
  border: 1.5px solid rgba(209, 142, 149, 0.35);
  box-shadow: 0 12px 32px rgba(48, 61, 28, 0.16);
  color: #303d1c;
  font-size: 1.05rem;
  line-height: 1.35;
  font-weight: 500;
  pointer-events: auto;
  opacity: 0;
  transform: translateX(0.6rem);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.lmyc-class-guide-nudge.is-visible {
  opacity: 1;
  transform: translateX(0);
}

.lmyc-class-guide-nudge[hidden] {
  display: none !important;
}

.lmyc-class-guide-nudge__text {
  margin: 0;
  flex: 1 1 auto;
}

.lmyc-class-guide-nudge__arrow {
  flex: 0 0 auto;
  width: 1.35rem;
  height: 1.35rem;
  color: #d18e95;
  animation: lmyc-ai-nudge-bounce 1.4s ease-in-out infinite;
}

.lmyc-class-guide-nudge__close {
  flex: 0 0 auto;
  width: 1.6rem;
  height: 1.6rem;
  border: 0;
  border-radius: 999px;
  background: rgba(66, 89, 54, 0.08);
  color: #425936;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
}

.lmyc-class-guide-nudge__close:hover,
.lmyc-class-guide-nudge__close:focus-visible {
  background: rgba(66, 89, 54, 0.16);
  outline: none;
}

@keyframes lmyc-ai-nudge-bounce {
  0%,
  100% {
    transform: translateX(0);
  }
  50% {
    transform: translateX(0.28rem);
  }
}

body.lmyc-contact-page .lmyc-class-guide-fab {
  bottom: 1.5rem;
}

body.lmyc-contact-page .lmyc-class-guide-nudge {
  bottom: calc(1.5rem + 0.55rem);
}
