/* ================================================================
   accessBlock plugin CSS  — theme neutral
   Uses CSS custom properties with sensible defaults.
   rsynPressPremium vars are used when available, otherwise fallback.
================================================================ */

/* Variable bridge — works standalone or inside rsynPressPremium */
.ab-card {
  --ab-bg:        var(--rpp-bg-2, #1a2230);
  --ab-border:    var(--rpp-border, rgba(255,255,255,.1));
  --ab-border-mid:var(--rpp-border-mid, rgba(255,255,255,.16));
  --ab-text:      var(--rpp-text, #f5f0eb);
  --ab-muted:     var(--rpp-text-muted, rgba(245,240,235,.65));
  --ab-faint:     var(--rpp-text-faint, rgba(245,240,235,.3));
  --ab-teal:      var(--rpp-teal, #1a6b5e);
  --ab-teal-lt:   var(--rpp-teal-light, #22896f);
  --ab-amber:     var(--rpp-amber, #c9a96e);
  --ab-radius:    var(--rpp-radius, 8px);
  --ab-radius-lg: var(--rpp-radius-lg, 12px);
  --ab-font-body: var(--rpp-font-body, 'DM Sans', sans-serif);
  --ab-font-mono: var(--rpp-font-mono, 'DM Mono', monospace);
}

/* ── Card shell ──────────────────────────────────────── */
.ab-card {
  background: var(--ab-bg);
  border: 1px solid var(--ab-border);
  border-radius: var(--ab-radius-lg);
  overflow: hidden;
  margin: 1.5rem 0;
  font-family: var(--ab-font-body);
  color: var(--ab-text);
}

.ab-card__header {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .85rem 1.25rem;
  border-bottom: 1px solid var(--ab-border);
  font-family: var(--ab-font-mono);
  font-size: .65rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  font-weight: 600;
}

.ab-card__icon {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.ab-card__header--locked {
  background: rgba(220, 60, 60, .08);
  color: #e57373;
  border-color: rgba(220, 60, 60, .2);
}

.ab-card__header--open {
  background: rgba(26,107,94, .12);
  color: var(--ab-teal-lt);
  border-color: rgba(26,107,94, .25);
}

.ab-card__header--editors {
  color: var(--ab-teal-lt);
}

/* ── Editors list ────────────────────────────────────── */
.ab-card--editors .ab-card__header {
  color: var(--ab-amber);
}

.ab-editors-list {
  list-style: none;
  padding: .75rem 1.25rem;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: .75rem;
}

.ab-editor {
  padding-bottom: .75rem;
  border-bottom: 1px solid var(--ab-border);
}
.ab-editor:last-child { border-bottom: none; padding-bottom: 0; }

.ab-editor__name {
  display: flex;
  align-items: center;
  gap: .4rem;
  font-size: .875rem;
  font-weight: 600;
  color: var(--ab-text);
}

.ab-editor__orcid {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  opacity: .85;
  transition: opacity .15s;
}
.ab-editor__orcid:hover { opacity: 1; }
.ab-editor__orcid svg { width: 14px; height: 14px; }

.ab-editor__affil {
  font-size: .78rem;
  color: var(--ab-muted);
  margin-top: .15rem;
  line-height: 1.4;
}

/* ── Access body ─────────────────────────────────────── */
.ab-access__body {
  padding: 1.1rem 1.25rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: .65rem;
}

.ab-access__desc {
  font-size: .8rem;
  color: var(--ab-muted);
  margin: 0;
  text-transform: uppercase;
  letter-spacing: .06em;
  font-family: var(--ab-font-mono);
}

.ab-access__price {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--ab-text);
  letter-spacing: -.02em;
  line-height: 1;
  margin: .15rem 0;
}

.ab-access__tier {
  padding: .9rem 1rem;
  background: rgba(255,255,255,.03);
  border: 1px solid var(--ab-border);
  border-radius: var(--ab-radius);
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

.ab-access__tier--book {
  border-color: rgba(201,169,110,.2);
  background: rgba(201,169,110,.04);
}

.ab-access__tier-label {
  font-size: .68rem;
  font-family: var(--ab-font-mono);
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--ab-muted);
}

.ab-access__isbn {
  font-size: .75rem;
  color: var(--ab-faint);
  font-family: var(--ab-font-mono);
}

.ab-access__divider {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin: .1rem 0;
}
.ab-access__divider::before,
.ab-access__divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--ab-border);
}
.ab-access__divider span {
  font-size: .7rem;
  color: var(--ab-faint);
  text-transform: uppercase;
  letter-spacing: .08em;
}

.ab-access__login-hint {
  font-size: .78rem;
  color: var(--ab-faint);
  text-align: center;
  margin: .25rem 0 0;
}
.ab-access__login-hint a { color: var(--ab-teal-lt); text-decoration: none; }
.ab-access__login-hint a:hover { text-decoration: underline; }

/* ── Buttons ─────────────────────────────────────────── */
.ab-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  width: 100%;
  padding: .6rem 1rem;
  border: none;
  border-radius: var(--ab-radius);
  font-family: var(--ab-font-body);
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: opacity .15s, transform .1s;
  line-height: 1;
}
.ab-btn:hover  { opacity: .9; }
.ab-btn:active { transform: scale(.98); }
.ab-btn svg    { width: 15px; height: 15px; flex-shrink: 0; }

.ab-btn--sm { padding: .5rem .85rem; font-size: .78rem; }

.ab-btn--paypal {
  background: #0070ba;
  color: #fff;
}
.ab-btn--paypal:hover { background: #005ea6; color: #fff; }

.ab-btn--razorpay {
  background: #2d6a4f;
  color: #fff;
  border: 1px solid rgba(255,255,255,.1);
}
.ab-btn--razorpay:hover { background: #1b4332; color: #fff; }

.ab-btn--subscribe {
  background: transparent;
  color: var(--ab-teal-lt);
  border: 1px solid var(--ab-teal);
}
.ab-btn--subscribe:hover {
  background: rgba(26,107,94,.12);
  color: var(--ab-teal-lt);
}

.ab-btn--book-link {
  background: transparent;
  color: var(--ab-muted);
  border: 1px solid var(--ab-border);
  font-size: .75rem;
}
.ab-btn--book-link:hover { color: var(--ab-text); border-color: var(--ab-border-mid); }

.ab-paypal-form { margin: 0; }

/* ── Chapter card modifier ───────────────────────────── */
.ab-card--chapter {
  border-color: rgba(220, 60, 60, .15);
}
