/* ============================================================
   Loreto Floating Reveal (lfr) — Elementor widget styles.

   Component only: no hero, no page/body styling. Custom properties are
   scoped to .lfr-toggle (not :root) so several widgets with different
   Elementor settings can coexist on one page.
   ============================================================ */

.lfr-toggle {
  /* colours */
  --lfr-hairline: #d9d9d9;

  /* sizing */
  --lfr-badge-w: 84px;
  --lfr-panel-h: 118px;
  --lfr-content-max-w: 460px;

  /* motion */
  --lfr-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --lfr-dur-slide: 0.55s;
  --lfr-dur-hover: 0.25s;

  display: inline-flex;
  align-items: stretch;
  height: var(--lfr-panel-h);
  max-width: 100%;
  background: #ffffff;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.18);
}

/* Reveal direction: which side the panel slides out from. In the DOM the
   content comes before the badge, so "left" is the natural row order. */
.lfr-toggle--right {
  flex-direction: row-reverse;
}

/* ---------- Sliding content — collapsed to zero width, revealed on toggle ---------- */
.lfr-toggle__content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  max-width: 0;
  padding: 0;
  overflow: hidden;
  white-space: nowrap;
  transition:
    max-width var(--lfr-dur-slide) var(--lfr-ease),
    padding var(--lfr-dur-slide) var(--lfr-ease);
}

.lfr-toggle__content p {
  margin: 0;
}

.lfr-toggle.is-open .lfr-toggle__content {
  max-width: var(--lfr-content-max-w);
  padding: 0 30px 0 34px;
}

.lfr-toggle__headline {
  font-family: "Noto Serif Display", serif;
  font-size: 19px;
  font-weight: 500;
  font-style: italic;
  line-height: 1em;
  color: #16609E;
}

.lfr-toggle__date {
  font-family: "Noto Sans", sans-serif;
  font-size: 15px;
  font-weight: 300;
  text-transform: uppercase;
  color: #203C72;
}

.lfr-toggle__title {
  font-family: "Noto Sans", sans-serif;
  font-size: 13px;
  font-weight: 400;
  color: #203C72;
}

.lfr-toggle__book {
  display: inline-block;
  width: fit-content;
  margin-top: 4px;
  padding: 9px 24px;
  border: 1px solid #082D63;
  border-radius: 100px;
  background-color: #ffffff;
  color: #16609E;
  font-family: "Noto Sans", sans-serif;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.5px;
  text-decoration: none;
  cursor: pointer;
  transition:
    background-color var(--lfr-dur-hover) ease,
    color var(--lfr-dur-hover) ease;
}

.lfr-toggle__book:hover {
  background-color: #1b4b7e;
  color: #ffffff;
}

/* ---------- Always-visible badge — the toggle handle ---------- */
.lfr-toggle__badge {
  flex: 0 0 var(--lfr-badge-w);
  width: var(--lfr-badge-w);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 12px 6px;
  background: #ffffff;
  border: none;
  border-radius: 0;
  cursor: pointer;
  font-family: inherit;
}

/* Divider between content and badge, only while open. The border sits on the
   side that faces the revealed content, which flips with the reveal direction. */
.lfr-toggle--left.is-open .lfr-toggle__badge {
  border-left: 1px solid var(--lfr-hairline);
  border-radius: 0px;
}

.lfr-toggle--right.is-open .lfr-toggle__badge {
  border-right: 1px solid var(--lfr-hairline);
}

.lfr-toggle__badge-icon {
  width: 44px;
  height: auto;
  display: block;
}

.lfr-toggle__badge-label {
  font-family: "Noto Sans", sans-serif;
  font-size: 9px;
  font-weight: 300;
  text-transform: uppercase;
  text-align: center;
  color: #203C72;
}

/* ---------- Responsive ---------- */
@media (max-width: 720px) {
  .lfr-toggle {
    max-width: 100%;
  }

  .lfr-toggle.is-open .lfr-toggle__content {
    max-width: 100%;
    padding-left: 20px;
    padding-right: 5px;
  }

  .lfr-toggle__content {
    flex: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .lfr-toggle__content,
  .lfr-toggle__book {
    transition: none !important;
  }
}
