/*
 * Member documents page (slug member-documents).
 * Loaded only on that page by eam_core_member_docs_enqueue()
 * (eam-core/includes/member-documents.php).
 *
 * Members see the page's own Kadence blocks (styled by Kadence and
 * member-resources.css). Everyone else sees the locked view built in code:
 * an indigo hero like the playbook heroes plus a "Members only" note.
 */

/* ---------- Locked view (non-members) ---------- */

/* Full-width rows start right under the header and end at the footer, as on
 * the other block pages (eam-site-polish.css does this for Kadence rows). */
body.eam-mdocs-page--locked .content-area {
  margin-top: 0;
  margin-bottom: 0;
}

body.eam-mdocs-page--locked .entry.content-bg {
  box-shadow: none;
}

.eam-mdocs-locked {
  /* break out of the theme content box to a full-bleed white band */
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  background: var(--global-palette9, #fff);
  font-family: var(--global-body-font-family, Roboto, sans-serif);
}

.eam-mdocs-wrap {
  box-sizing: border-box;
  width: 100%;
  max-width: var(--global-content-width, 1320px);
  margin: 0 auto;
  padding-right: var(--global-content-edge-padding, 1.5rem);
  padding-left: var(--global-content-edge-padding, 1.5rem);
}

.eam-mdocs-hero {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: flex-end;
  min-height: 380px;
  overflow: hidden;
  background: var(--global-palette1, #5a64ad);
  color: var(--global-palette9, #fff);
}

/* Same faint bell curve as the playbook heroes (eam-site-polish.css). */
.eam-mdocs-hero::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 0;
  height: clamp(120px, 52%, 300px);
  background: url("../img/eam-bell-curve.svg") no-repeat center bottom / 100% 100%;
  opacity: .16;
  pointer-events: none;
}

.eam-mdocs-hero > .eam-mdocs-wrap {
  position: relative;
  z-index: 1;
  padding-top: 1.5rem;
  /* 6.5rem row padding + the 2rem under the Kadence lede on the member
   * view, so the title sits at the same height in both views. */
  padding-bottom: 8.5rem;
}

.eam-mdocs-locked .eam-page-hero__eyebrow {
  display: block;
  margin-bottom: 0; /* as the Kadence eyebrow on the member view */
}

.eam-mdocs-locked .eam-page-hero__title {
  margin: 0 0 1rem;
}

.eam-mdocs-body {
  padding-top: 5rem;
  padding-bottom: 4rem;
}

.eam-mdocs-note {
  display: flex;
  align-items: flex-start;
  gap: .85rem;
  max-width: 728px;
  padding: 1.35rem 1.5rem;
  border: 1px solid #dde0ef;
  border-left: 4px solid var(--global-palette1, #5a64ad);
  border-radius: 12px;
  background: var(--global-palette8, #f5f6fa);
}

.eam-mdocs-note svg {
  flex: none;
  width: 20px;
  height: 20px;
  margin-top: .2rem;
  fill: var(--global-palette1, #5a64ad);
}

.eam-mdocs-note p {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--global-palette4, #2b2b2b);
}

.eam-mdocs-note strong {
  color: var(--global-palette3, #1d1d1d);
}

.eam-mdocs-note a {
  color: var(--global-palette1, #5a64ad);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.eam-mdocs-note a:hover,
.eam-mdocs-note a:focus {
  color: var(--global-palette3, #1d1d1d);
}

@media (max-width: 767px) {
  /* keep the bell shape on narrow screens, as on the playbook heroes */
  .eam-mdocs-hero::after {
    background-size: 180% 100%;
  }

  .eam-mdocs-hero > .eam-mdocs-wrap {
    padding-top: 40px;
    padding-bottom: calc(48px + 2rem);
  }

  .eam-mdocs-locked .eam-page-hero__eyebrow {
    margin-bottom: .9rem;
  }

  .eam-mdocs-body {
    padding-top: 3rem;
    padding-bottom: 3rem;
  }

  .eam-mdocs-note {
    padding: 1.1rem 1.15rem;
  }
}

/* ---------- Member view ---------- */

/* Document sections: one card per heading; File blocks the board adds sit
 * inside them. */
.eam-mdocs-card .wp-block-file {
  margin: 1rem 0 0;
}

.eam-mdocs-card .wp-block-file a:not(.wp-block-file__button) {
  color: var(--global-palette1, #5a64ad);
  font-weight: 600;
}

/* Editors only: links to files in the public Media Library folder. */
.eam-mdocs-editor-note {
  max-width: var(--global-content-width, 1320px);
  margin: 1rem auto;
  padding: .9rem 1.2rem;
  border: 1px solid #e6c36a;
  border-left: 4px solid #c9962b;
  border-radius: 10px;
  background: #fff8e6;
  font-size: .95rem;
}

.eam-mdocs-editor-note p {
  margin: 0;
}
