/**
 * @file
 * Maps Ascent design tokens to custom module CSS variable names.
 *
 * career_advisory, membership_portal, and bidforge ship component CSS that
 * reads generic custom properties. Bridge them here so modules inherit the
 * Ascent palette without per-module overrides.
 */
:root {
  --color-primary: var(--color-brand-sage);
  --color-brand: var(--color-brand-sage);
  --color-ink: var(--color-brand-deep);
  --color-muted: var(--color-fg-subtle);
  --color-text-muted: var(--color-fg-muted);
  --color-border: rgb(26 28 30 / 12%);
  --color-bg-elevated: var(--color-surface);
  --color-bg: var(--color-brand-cream);
  --font-mono: ui-monospace, 'SF Mono', Menlo, monospace;
  --radius-md: var(--radius-sm);
  --shadow-card: 0 4px 24px rgb(26 28 30 / 8%);
  --af-header-height: 5rem;

  /* bidforge.project.css reads axiom_frontier shadcn tokens */
  --foreground: var(--color-brand-deep);
  --muted-foreground: var(--color-fg-muted);
  --brand: var(--color-brand-sage);
  --card: var(--color-surface);
  --border: var(--color-border);
  --muted: rgb(26 28 30 / 6%);
  --background: var(--color-brand-cream);
}

/* Member hub + membership plans */
.af-member-hub,
.tp.tp-pricing {
  padding-top: 2rem;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

.af-member-hub__card:hover,
.af-member-hub__card:focus-visible {
  border-color: var(--color-brand-sage);
}

.af-member-hub__card-action,
.af-member-hub__cta-link,
.af-member-hub__eyebrow {
  color: var(--color-brand-sage);
}

.af-member-hub__cta-link {
  background: var(--color-brand-sage);
  color: var(--color-brand-cream);
}

.af-member-hub__status {
  background: rgb(74 103 65 / 10%);
  border-color: rgb(74 103 65 / 25%);
}

.tp-pricing__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
  gap: 1.5rem;
  margin-top: 2.5rem;
}

.tp-pricing__card {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 2rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  box-shadow: var(--shadow-card);
}

/* Keep trial / subscribe / billing CTAs on one baseline across cards. */
.tp-pricing__card > .tp-btn,
.tp-pricing__card > form {
  margin-top: auto;
}

.tp-pricing__card > form .tp-btn {
  width: 100%;
}

.tp-pricing__card.is-current,
.tp-pricing__card.is-recommended {
  border-color: var(--color-brand-sage);
  box-shadow: 0 0 0 1px var(--color-brand-sage);
}

.tp-pricing__card h2 {
  font-family: var(--font-display);
  font-weight: 400;
}

.tp-pricing__price {
  font-family: var(--font-display);
  font-size: 2.25rem;
  font-weight: 500;
  margin: 0.5rem 0 1rem;
}

.tp-pricing__price span {
  font-size: 1rem;
  color: var(--color-fg-muted);
  font-weight: 400;
}

.tp-pricing__desc,
.tp-pricing__intro {
  color: var(--color-fg-muted);
}

.tp-pricing__features {
  margin: 0 0 1.5rem;
  padding-left: 1.25rem;
  color: var(--color-fg-muted);
}

.tp-btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border: 1px solid var(--color-brand-sage);
  border-radius: var(--radius-sm);
  text-decoration: none;
  font: inherit;
  cursor: pointer;
  background: transparent;
  color: var(--color-brand-deep);
}

.tp-btn--muted {
  opacity: 0.6;
  cursor: default;
  pointer-events: none;
}

.tp-trial-confirm__card {
  max-width: 28rem;
  margin-top: 2rem;
}

.tp-trial-confirm__back {
  margin: 1.25rem 0 0;
  font-size: 0.9375rem;
}

.tp-trial-confirm__back a {
  color: var(--color-brand-sage);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

/* System error pages */
.route--system-4xx .page-content {
  padding: 4rem var(--container-pad);
  max-width: var(--container-max);
  margin-inline: auto;
  text-align: center;
}

.route--system-4xx .page-content .block--system-main-block {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--color-fg-muted);
}

.page-messages {
  padding-top: 1.5rem;
}

/* Inner pages (modules, forms) — content region padding */
.page-content {
  box-sizing: border-box;
  max-width: var(--container-max);
  margin-inline: auto;
  padding: 3rem var(--container-pad) 5rem;
}

@media (min-width: 768px) {
  .page-content {
    padding-inline: var(--container-pad-md);
  }
}

.page-content > .job-tracker,
.page-content .job-tracker.job-tracker-form,
.page-content > .interview-coaching,
.page-content .interview-coaching.interview-coaching-form {
  padding: 0;
}

/* Hide duplicate core page title when module renders its own heading */
.page-content:has(.job-tracker-form) .block-page-title-block,
.page-content:has(.job-tracker) .block-page-title-block,
.page-content:has(.interview-coaching) .block-page-title-block,
.page-content:has(.interview-coaching-form) .block-page-title-block {
  display: none;
}

.tp__eyebrow,
.tp-pricing__badge {
  color: var(--color-brand-sage);
}

.tp-btn--primary,
.tp-btn:not(.tp-btn--muted) {
  background: var(--color-brand-sage);
  color: var(--color-brand-cream);
  border-radius: var(--radius-sm);
}

.tp-btn--primary:hover,
.tp-btn:not(.tp-btn--muted):hover {
  background: var(--color-brand-deep);
}

/* Career advisory cards */
.career-ai-card:hover {
  border-color: var(--color-brand-sage);
}

.career-ai-card__score {
  color: var(--color-brand-sage);
  font-family: var(--font-display);
}

/* Align Drupal core .button CTAs inside career pages with Ascent tokens. */
.page-content .career-profile .button--primary,
.page-content .career-cert-detail .button--primary,
.page-content .career-tracks .button--primary {
  background: var(--color-brand-sage);
  border-color: var(--color-brand-sage);
  color: var(--color-brand-cream);
  border-radius: var(--radius-sm);
}

.page-content .career-profile .button--primary:hover,
.page-content .career-cert-detail .button--primary:hover,
.page-content .career-tracks .button--primary:hover,
.page-content .career-profile .button--primary:focus-visible,
.page-content .career-cert-detail .button--primary:focus-visible,
.page-content .career-tracks .button--primary:focus-visible {
  background: var(--color-brand-deep);
  border-color: var(--color-brand-deep);
  color: var(--color-brand-cream);
}

/* BidForge bids pipeline (Views page) */
.bidforge-bids-view {
  font-family: var(--font-body);
  color: var(--color-fg);
}

.bidforge-bids-view table td,
.bidforge-bids-view table td a {
  font-family: var(--font-body);
  color: var(--color-fg);
}

.bidforge-bids-view .bidforge-pipeline-tabs__tab {
  color: var(--color-fg-muted);
  border-color: var(--color-border);
}

.bidforge-bids-view .bidforge-pipeline-tabs__tab:hover {
  color: var(--color-brand-deep);
  border-color: var(--color-brand-sage);
}

.bidforge-bids-view .bidforge-pipeline-tabs__tab.is-active {
  color: var(--color-brand-cream);
  background: var(--color-brand-sage);
  border-color: var(--color-brand-sage);
}

.bidforge-bids-view .views-exposed-form {
  border-color: var(--color-border);
  background: var(--color-surface);
}

/* BidForge upload forms */
.page-content:has(.bidforge-upload-bid-form) .block-page-title-block,
.page-content:has(.bidforge-upload-rfp-form) .block-page-title-block {
  display: none;
}

.bidforge-upload-page {
  font-family: var(--font-body);
  color: var(--color-fg);
}

.bidforge-upload-page .bidforge-view-title {
  font-family: var(--font-display);
  font-weight: 400;
  color: var(--color-brand-deep);
}

.bidforge-upload-page .bidforge-view-sub,
.bidforge-upload-page .form-item .description {
  color: var(--color-fg-muted);
}

.bidforge-upload-page .form-text,
.bidforge-upload-page .form-textarea,
.bidforge-upload-page .form-select,
.bidforge-upload-page .form-managed-file {
  color: var(--color-fg);
  background: var(--color-surface);
  border-color: var(--color-border);
}
