/* Premium Bookmarks — dedicated shell page + the shared practice/review tool. */

body[data-view="bookmarksSection"] .app-header { display: none; }
body[data-view="bookmarksSection"] main { padding: 0; }
body[data-view="bookmarksSection"] { background: var(--sh-nb); }

.sh-bookmarks { --sh-panel-ink-mut: rgba(11,41,72,.7); gap: 16px !important; }
.sh-bookmarks-topbar { align-items: flex-end; padding-top: 24px; }
.sh-bookmarks-eyebrow,
.sh-bookmarks-lockeyebrow { color: var(--sh-gold); font-size: 10px; font-weight: 800;
  letter-spacing: .11em; text-transform: uppercase; }
.sh-bookmarks-sub { color: var(--sh-tm); font-size: 13px; margin-top: 5px; }
.sh-bookmarks-premium { flex: none; border: 1px solid color-mix(in srgb, var(--sh-gold) 45%, transparent);
  border-radius: 999px; color: var(--sh-gold); font-size: 11px; font-weight: 800;
  padding: 7px 12px; }

.sh-bookmarks-loading,
.sh-bookmarks-message { display: flex; align-items: center; gap: 14px; min-height: 86px; }
.sh-bookmarks-loading strong,
.sh-bookmarks-message strong { display: block; font-size: 14px; }
.sh-bookmarks-loading span:not(.sh-bookmarks-loading-icon),
.sh-bookmarks-message div > span { display: block; color: var(--sh-panel-ink-mut); font-size: 12px;
  line-height: 1.45; margin-top: 3px; }
.sh-bookmarks-loading-icon { width: 24px; height: 24px; flex: none; border: 2px solid rgba(11,41,72,.18);
  border-top-color: var(--sh-red); border-radius: 50%; animation: sh-bookmark-spin .75s linear infinite; }
.sh-bookmarks-message-icon { width: 34px; height: 34px; flex: none; display: grid; place-items: center;
  border-radius: 10px; background: color-mix(in srgb, var(--sh-red) 12%, transparent);
  color: var(--sh-red); font-weight: 900; }
.sh-bookmarks-message > div { flex: 1; min-width: 0; }
@keyframes sh-bookmark-spin { to { transform: rotate(360deg); } }

.sh-bookmarks-primary,
.sh-bookmarks-secondary { min-height: 44px; border-radius: 9px; padding: 10px 15px; font: inherit;
  font-size: 12.5px; font-weight: 800; cursor: pointer; transition: transform .1s ease, filter .15s ease,
  background .15s ease, border-color .15s ease; }
.sh-bookmarks-primary { border: 1px solid transparent; color: #FFF9ED; background: var(--sh-red); }
.sh-bookmarks-primary:hover:not(:disabled) { filter: brightness(1.08); }
.sh-bookmarks-secondary { border: 1px solid var(--sh-hairC); color: var(--sh-ink); background: transparent; }
.sh-bookmarks-secondary:hover:not(:disabled) { border-color: color-mix(in srgb, var(--sh-ink) 38%, transparent);
  background: rgba(11,41,72,.045); }
.sh-bookmarks-primary:active:not(:disabled),
.sh-bookmarks-secondary:active:not(:disabled) { transform: translateY(1px); }
.sh-bookmarks-primary:disabled,
.sh-bookmarks-secondary:disabled { cursor: not-allowed; opacity: .52; }
.sh-bookmarks-primary:focus-visible,
.sh-bookmarks-secondary:focus-visible { outline: 2px solid var(--sh-gold); outline-offset: 3px; }

.sh-bookmarks-lockstage { position: relative; min-height: 470px; display: grid; place-items: center; overflow: hidden;
  border: 1px solid var(--sh-hairD); border-radius: 14px; }
.sh-bookmarks-samples { position: absolute; inset: 18px; display: grid; gap: 12px; filter: blur(5px);
  opacity: .43; transform: scale(1.015); }
.sh-bookmark-skeleton { min-height: 118px; border-radius: 11px; border: 1px solid rgba(11,41,72,.13);
  background:
    linear-gradient(90deg, transparent 0 13%, rgba(11,41,72,.08) 13% 14%, transparent 14%),
    linear-gradient(#F7F2EA, #F7F2EA); box-shadow: 0 9px 22px rgba(0,0,0,.08); }
.sh-bookmarks-lockcard { position: relative; z-index: 1; width: min(520px, calc(100% - 32px)); padding: 30px;
  text-align: center; box-shadow: 0 24px 60px rgba(0,0,0,.28); }
.sh-bookmarks-lockicon,
.sh-bookmarks-emptyicon { width: 68px; height: 68px; margin: 0 auto 14px; display: grid; place-items: center;
  border: 1px solid rgba(11,41,72,.14); border-radius: 18px; background: #FFF9EE;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9), 0 7px 18px rgba(11,41,72,.08); }
.sh-bookmarks-lockicon svg,
.sh-bookmarks-emptyicon svg { width: 45px; height: 45px; }
.sh-bookmarks-lockcard h2 { color: var(--sh-ink); font-size: clamp(23px, 3vw, 31px); line-height: 1.1;
  margin: 6px auto 10px; max-width: 430px; }
.sh-bookmarks-lockcard p { color: var(--sh-panel-ink-mut); font-size: 13.5px; line-height: 1.55;
  margin: 0 auto 18px; max-width: 430px; }
.sh-bookmarks-lockcard small { display: block; color: var(--sh-panel-ink-mut); font-size: 11px; margin-top: 12px; }

.sh-bookmarks-summary { display: flex; align-items: center; justify-content: space-between; gap: 12px;
  color: var(--sh-tm); font-size: 12px; padding: 0 3px; }
.sh-bookmarks-summary strong { color: var(--sh-t); }
.sh-bookmarks-list { display: grid; gap: 12px; margin-top: 12px; }
.sh-bookmark-row { display: grid; grid-template-columns: 68px minmax(0, 1fr); gap: 18px; align-items: start;
  padding: 20px; border: 1px solid rgba(11,41,72,.1); box-shadow: 0 9px 24px rgba(0,0,0,.075); }
.sh-bookmark-iconwell { width: 64px; height: 64px; display: grid; place-items: center; border-radius: 16px;
  background: #FFF9EE; border: 1px solid rgba(11,41,72,.14); box-shadow: 0 5px 14px rgba(11,41,72,.08); }
.sh-bookmark-iconwell svg { width: 44px; height: 44px; }
.sh-bookmark-row-content { min-width: 0; }
.sh-bookmark-row-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.sh-bookmark-chip { display: inline-flex; align-items: center; min-height: 24px; border: 1px solid rgba(11,41,72,.14);
  border-radius: 999px; color: var(--sh-panel-ink-mut); font-size: 10.5px; font-weight: 700; padding: 3px 9px; }
.sh-bookmark-chip--exam { color: var(--sh-goldC); border-color: color-mix(in srgb, var(--sh-goldC) 35%, transparent);
  background: color-mix(in srgb, var(--sh-gold) 9%, transparent); letter-spacing: .04em; }
.sh-bookmark-savedat { color: var(--sh-panel-ink-mut); font-size: 10.5px; margin-left: auto; }
.sh-bookmark-stem { color: var(--sh-ink); font-size: clamp(17px, 2.3vw, 21px); font-weight: 600;
  line-height: 1.35; margin: 12px 0 16px; overflow-wrap: anywhere; }
.sh-bookmark-row--unavailable .sh-bookmark-iconwell { filter: grayscale(.65); opacity: .72; }
.sh-bookmark-row--unavailable .sh-bookmark-stem { color: var(--sh-panel-ink-mut); }
.sh-bookmark-row-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; }
.sh-bookmark-review { min-width: 150px; }
.sh-bookmark-remove { min-width: 92px; }
.sh-bookmarks-empty { text-align: center; padding: 42px 24px; margin-top: 12px; }
.sh-bookmarks-empty h2 { color: var(--sh-ink); font-size: 25px; margin: 0 0 6px; }
.sh-bookmarks-empty p { color: var(--sh-panel-ink-mut); font-size: 13px; margin: 0 auto 18px; }
.sh-bookmarks-actions { display: flex; justify-content: space-between; gap: 12px; margin-top: 14px; }
.sh-bookmarks-actions:has(#bookmarksLoadMore.hidden) { justify-content: flex-end; }

/* The toolbar is shared by live practice and Review Answers. */
#practiceModal .ep-question-tools { text-align: left !important; margin-top: 4px; }
#practiceModal .ep-question-tools-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
#practiceModal .ep-question-tools-label { color: var(--em-ink-faint); font-size: 10px; font-weight: 800;
  letter-spacing: .09em; text-transform: uppercase; margin-right: 2px; }
#practiceModal #bookmarkQuestionBtn { min-height: 38px; display: inline-flex; align-items: center; justify-content: center;
  gap: 7px; border: 1px solid #bd8b2a; border-radius: 11px; background: #fff8e8;
  color: #7a4e0a; padding: 7px 12px; font: inherit; font-size: 12px; font-weight: 700;
  cursor: pointer; transition: background .15s ease, border-color .15s ease, color .15s ease; }
#practiceModal #bookmarkQuestionBtn svg { width: 18px; height: 18px; flex: none; }
#practiceModal #bookmarkQuestionBtn:hover:not(:disabled) { color: #633e06; border-color: #9f6f14;
  background: #fff1d0; }
#practiceModal #bookmarkQuestionBtn.is-saved { color: #fff; border-color: #173f61;
  background: #0c3151; }
#practiceModal #bookmarkQuestionBtn.is-saved .ep-bookmark-question-fill { fill: var(--em-gold); }
#practiceModal #bookmarkQuestionBtn.is-locked { color: var(--em-ink-faint); background: #f2eadc; border-color: #c9c1b4; border-style: dashed; }
#practiceModal #bookmarkQuestionBtn.has-error { border-color: rgba(218,48,56,.7); }
#practiceModal #bookmarkQuestionBtn:disabled { cursor: not-allowed; opacity: .55; }
#practiceModal #bookmarkQuestionBtn:focus-visible { outline: 2px solid var(--em-gold); outline-offset: 3px; }
#practiceModal #bookmarkQuestionBtn.is-loading::after { content: ''; width: 12px; height: 12px; border: 2px solid var(--em-line-strong);
  border-top-color: var(--em-gold); border-radius: 50%; animation: sh-bookmark-spin .75s linear infinite; }
#practiceModal .ep-bookmark-premium { color: #0B2948; background: #e6a826; border-radius: 999px;
  font-size: 8px; font-weight: 900; letter-spacing: .04em; padding: 2px 6px; text-transform: uppercase; }
#practiceModal .ep-bookmark-question-status { flex: 1 1 100%; min-height: 16px; color: var(--em-ink-faint);
  font-size: 11px; line-height: 1.35; }
#practiceModal #reportQuestionLink { min-height: 38px; display: inline-flex; align-items: center; }

@media (min-width: 1024px) {
  body[data-view="bookmarksSection"] .sh-content { max-width: 1120px; }
}

@media (max-width: 640px) {
  body[data-view="bookmarksSection"] main { padding-bottom: 0; }
  .sh-bookmarks-topbar { align-items: flex-start; padding-top: 18px; }
  .sh-bookmarks-premium { margin-top: 2px; }
  .sh-bookmarks-lockstage { min-height: 510px; }
  .sh-bookmarks-lockcard { padding: 25px 18px; }
  .sh-bookmark-row { grid-template-columns: 48px minmax(0, 1fr); gap: 12px; padding: 16px 14px; }
  .sh-bookmark-iconwell { width: 48px; height: 48px; border-radius: 13px; }
  .sh-bookmark-iconwell svg { width: 35px; height: 35px; }
  .sh-bookmark-savedat { flex: 1 1 100%; margin-left: 0; }
  .sh-bookmark-row-actions,
  .sh-bookmarks-actions { display: grid; grid-template-columns: 1fr; }
  .sh-bookmarks-primary,
  .sh-bookmarks-secondary,
  #practiceModal #bookmarkQuestionBtn,
  #practiceModal #reportQuestionLink { min-height: 44px; }
  .sh-bookmarks-summary { align-items: flex-start; flex-direction: column; gap: 3px; }
  #practiceModal .ep-question-tools-label { flex: 1 1 100%; }
  #practiceModal #bookmarkQuestionBtn,
  #practiceModal #reportQuestionLink { flex: 1 1 calc(50% - 4px); }
}

@media (min-width: 641px) and (max-width: 1023px) {
  body[data-view="bookmarksSection"] main { padding-bottom: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .sh-bookmarks-loading-icon,
  #practiceModal #bookmarkQuestionBtn.is-loading::after { animation: none; }
}
