/* Plucky Works theme for MkDocs Material — neutral greys, Stripe-docs style

   Goal: draw the reader's eye to the middle of the page first. The reading
   column is a white surface on a light cool-grey canvas; the left navigation
   and the right table of contents are muted so they recede.

   Palette (cool neutral greys, in the spirit of the Stripe docs):
   - Canvas: light grey #f6f9fc
   - Content surface: white #ffffff
   - Keylines / borders: #e3e8ee
   - Headings: dark slate #1a1f36; body text: #3c4257; muted: ~#7b8293
   - Action / links: brick red #a72536 (the one Plucky brand accent kept)
   - Type: Inter for everything (headings + body), loaded via font.text in
     mkdocs.yml. No serif.
*/

[data-md-color-scheme="default"] {
    /* Primary = dark slate: active nav, focus rings, strong chrome */
    --md-primary-fg-color: #1a1f36;
    --md-primary-fg-color--light: #3c4257;
    --md-primary-fg-color--dark: #0b0e1a;
    --md-primary-bg-color: #ffffff;
    --md-primary-bg-color--light: #f6f9fc;

    /* Accent = brick red: the action color (interactive, hover) */
    --md-accent-fg-color: #a72536;
    --md-accent-fg-color--transparent: rgba(167, 37, 54, 0.1);
    --md-accent-bg-color: #ffffff;
    --md-accent-bg-color--light: #fde9ec;

    /* Foreground - cool slate text. Muted steps run a touch darker than the
       Stripe defaults so grey text (nav, labels, captions) stays legible. */
    --md-default-fg-color: rgba(60, 66, 87, 1);
    --md-default-fg-color--light: rgba(60, 66, 87, 0.78);
    --md-default-fg-color--lighter: rgba(60, 66, 87, 0.55);
    --md-default-fg-color--lightest: rgba(60, 66, 87, 0.32);

    /* Background - light cool-grey canvas and its neutral steps */
    --md-default-bg-color: #f6f9fc;
    --md-default-bg-color--light: #eef2f7;
    --md-default-bg-color--lighter: #e3e8ee;
    --md-default-bg-color--lightest: #d5dbe1;

    /* Code - soft cool-grey surface */
    --md-code-fg-color: #3c4257;
    --md-code-bg-color: #eef2f7;
    --md-code-bg-color--light: #f4f7fa;
    --md-code-hl-color: rgba(60, 66, 87, 0.12);

    /* Typography - brick red links */
    --md-typeset-color: rgba(60, 66, 87, 1);
    --md-typeset-a-color: #a72536;

    /* Footer - cool and quiet */
    --md-footer-fg-color: rgba(60, 66, 87, 1);
    --md-footer-fg-color--light: rgba(60, 66, 87, 0.7);
    --md-footer-fg-color--lighter: rgba(60, 66, 87, 0.5);
    --md-footer-bg-color: #e3e8ee;
    --md-footer-bg-color--dark: #d5dbe1;
}

/* ---------------------------------------------------------------------------
   Type: clean sans headings in dark slate (Inter comes from the theme). Tight
   tracking and firm weights, in the spirit of the Stripe docs.
--------------------------------------------------------------------------- */
.md-typeset h1,
.md-typeset h2,
.md-typeset h3,
.md-typeset h4 {
    font-family: "Inter", "Helvetica Neue", Arial, sans-serif;
    color: #1a1f36;
    letter-spacing: -0.01em;
}

.md-typeset h1 {
    font-weight: 700;
    margin-bottom: 0.6em;
}

.md-typeset h2 {
    font-weight: 700;
}

.md-typeset h3,
.md-typeset h4 {
    font-weight: 600;
}

/* ---------------------------------------------------------------------------
   Header + tabs: white chrome with cool-grey keylines, dark-slate accents
--------------------------------------------------------------------------- */
.md-header {
    background-color: #ffffff;
    border-bottom: 1px solid #e3e8ee;
    box-shadow: 0 1px 3px rgba(26, 31, 54, 0.04);
}

.md-header__button.md-logo {
    filter: none;
}

.md-header__title {
    color: #3c4257;
}

.md-header__button {
    color: rgba(60, 66, 87, 0.7);
}

.md-header__button:hover {
    color: #1a1f36;
}

.md-search__input {
    background-color: #dce3ec;
    border: 1px solid #c3ccd8;
    color: rgba(60, 66, 87, 1);
}

.md-search__input::placeholder {
    color: rgba(60, 66, 87, 0.7);
}

.md-search__icon {
    color: rgba(60, 66, 87, 0.7);
}

.md-tabs {
    background-color: #ffffff;
    border-bottom: 1px solid #e3e8ee;
}

.md-tabs__link {
    color: rgba(60, 66, 87, 0.7) !important;
    opacity: 1 !important;
}

.md-tabs__link:hover,
.md-tabs__link--active {
    color: #1a1f36 !important;
    opacity: 1 !important;
}

.md-tabs__link--active {
    font-weight: 600;
}

/* ---------------------------------------------------------------------------
   The focal point: lift the reading column onto a white surface over the grey
   canvas, so the eye lands in the middle. Desktop only — on narrow screens the
   nav folds into a drawer and the body is already the whole view.
--------------------------------------------------------------------------- */
@media screen and (min-width: 76.25em) {
    .md-content {
        background-color: #ffffff;
        border: 1px solid #e3e8ee;
        border-radius: 8px;
        box-shadow: 0 1px 3px rgba(26, 31, 54, 0.05);
        /* Horizontal margin is the gutter between the reading card and the two
           sidebars — widen it to give the columns more breathing room. */
        margin: 0 1.75rem 1.5rem;
    }

    .md-content__inner {
        margin-inline: 1.4rem;
    }
}

/* ---------------------------------------------------------------------------
   Secondary chrome: mute the left nav and right table of contents so they
   recede. Muted slate labels; dark slate only on hover/active.
--------------------------------------------------------------------------- */
.md-nav {
    color: var(--md-default-fg-color--light);
}

.md-nav__title {
    color: var(--md-default-fg-color--light);
    font-weight: 600;
}

.md-sidebar--primary .md-nav__link,
.md-sidebar--secondary .md-nav__link,
.md-sidebar--primary .md-nav__title,
.md-sidebar--secondary .md-nav__title {
    color: rgba(60, 66, 87, 0.95);
}

/* Right-hand TOC heading ("On this page") set as an uppercase eyebrow label */
.md-sidebar--secondary .md-nav__title {
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 0.68rem;
}

.md-nav__link:hover {
    color: #1a1f36;
}

.md-nav__link--active,
.md-nav__link--active:hover {
    color: #1a1f36;
    font-weight: 600;
}

/* Sidebar scrollbars: keep the thumb grey. Material tints it with the accent
   color (brick red) while the scroll area is hovered — override that so it
   stays a quiet grey, darkening only slightly for feedback. */
.md-sidebar__scrollwrap {
    scrollbar-color: var(--md-default-fg-color--lighter) transparent;
}

.md-sidebar__scrollwrap:hover {
    scrollbar-color: var(--md-default-fg-color--light) transparent;
}

.md-sidebar__scrollwrap::-webkit-scrollbar-thumb {
    background-color: var(--md-default-fg-color--lighter);
}

.md-sidebar__scrollwrap:hover::-webkit-scrollbar-thumb,
.md-sidebar__scrollwrap::-webkit-scrollbar-thumb:hover {
    background-color: var(--md-default-fg-color--light);
}

/* ---------------------------------------------------------------------------
   Content: brick-red links, cool rules, quiet callouts
--------------------------------------------------------------------------- */
.md-typeset a:hover {
    color: #7a1a27;
}

.md-nav__link,
.md-typeset a,
.md-button,
.md-header__button,
.md-tabs__link {
    transition: color 0.2s ease, background-color 0.2s ease;
}

.md-typeset table:not([class]) th {
    background-color: #f6f9fc;
    color: #3c4257;
}

/* Callouts sit as lifted white cards on the reading surface */
.md-typeset .admonition,
.md-typeset details {
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(26, 31, 54, 0.05);
    background-color: #ffffff;
}

/* Note admonitions take a neutral slate accent */
.md-typeset .admonition.note,
.md-typeset details.note {
    border-color: #425466;
}

.md-typeset .note > .admonition-title,
.md-typeset .note > summary {
    background-color: rgba(60, 66, 87, 0.06);
}

/* Documentation screenshots - tasteful frame on a white mat */
.md-typeset img {
    background-color: #ffffff;
    padding: 8px;
    border: 1px solid #e3e8ee;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(26, 31, 54, 0.06);
}

/* Mermaid diagrams render as inline SVG — no photo frame around them */
.md-typeset .mermaid {
    background: transparent;
    border: 0;
    padding: 0;
    box-shadow: none;
}

/* Feedback thumbs — Material renders the two icons flush; give them air */
.md-feedback__list {
    gap: 1.25rem;
}

/* Feedback widget detail panel — comment + email follow-up */
.plucky-feedback-detail {
    margin-top: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    max-width: 36rem;
}
.plucky-feedback-label {
    font-size: 0.78rem;
    color: var(--md-default-fg-color--light);
}
.plucky-feedback-textarea,
.plucky-feedback-input {
    width: 100%;
    padding: 0.45rem 0.55rem;
    font: inherit;
    color: var(--md-default-fg-color);
    background: #ffffff;
    border: 1px solid var(--md-default-fg-color--lightest);
    border-radius: 4px;
}
.plucky-feedback-textarea:focus,
.plucky-feedback-input:focus {
    outline: none;
    border-color: var(--md-primary-fg-color);
}
.plucky-feedback-honeypot {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
}
.plucky-feedback-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.25rem;
}
.plucky-feedback-status {
    font-size: 0.78rem;
    color: var(--md-default-fg-color--light);
}
