/*
 * GitAlert theme for the LaRecipe docs (/docs).
 *
 * LaRecipe ships its own CSS and a Vue app, and the docs do not go through
 * Vite, so this is a static file loaded after the package stylesheet by
 * resources/views/vendor/larecipe/default.blade.php. Keep it plain CSS with no
 * build step. Colours follow the marketing site's Tailwind palette (blue-700
 * primary, gray/slate text, emerald/amber/rose label pills).
 */

:root {
    --docs-blue-50: #eff6ff;
    --docs-blue-100: #dbeafe;
    --docs-blue-200: #bfdbfe;
    --docs-blue-700: #1d4ed8;
    --docs-blue-800: #1e40af;
    --docs-blue-900: #1e3a8a;
    --docs-text: #1f2937;
    --docs-heading: #111827;
    --docs-muted: #4b5563;
    --docs-toc: #475569;
    --docs-border: #e5e7eb;
    --docs-sidebar-bg: #f4f5f7;
    --docs-nav-h: 4.25rem; /* the site header's height, so the bar does not change between pages */
    --docs-font-sans: "IBM Plex Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --docs-font-display: "Space Grotesk", "IBM Plex Sans", ui-sans-serif, system-ui, sans-serif;
    --docs-font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    /* LaRecipe reads these for its own components. */
    --primary: #1d4ed8;
    --secondary: #1d4ed8;
    --sidebar: #f4f5f7;
    --documentation: #ffffff;
}

html,
body {
    background-color: #ffffff;
}

/* A link to #section-N must not land the heading under the fixed top bar. */
html {
    scroll-padding-top: calc(var(--docs-nav-h) + 1rem);
}

body {
    font-family: var(--docs-font-sans);
    color: var(--docs-text);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ---------------------------------------------------------------- skip link */

.docs-skip-link {
    position: absolute;
    left: 1rem;
    top: -4rem;
    z-index: 100;
    padding: .625rem 1rem;
    border-radius: .5rem;
    background: #ffffff;
    color: var(--docs-blue-700);
    font-weight: 600;
    text-decoration: underline;
    box-shadow: 0 2px 8px rgba(15, 23, 42, .2);
}

.docs-skip-link:focus {
    top: .75rem;
    outline: 2px solid var(--docs-blue-700);
    outline-offset: 2px;
}

/* ---------------------------------------------------------------------- nav */

.docs-topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 40;
}

.docs-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    height: var(--docs-nav-h);
    padding: 0 1rem;
    background-color: var(--docs-blue-700);
    color: #ffffff;
    box-shadow: 0 1px 0 rgba(15, 23, 42, .08);
}

.docs-nav-start,
.docs-nav-end {
    display: flex;
    align-items: center;
    min-width: 0;
}

.docs-nav-start {
    gap: .5rem;
}

.docs-nav-end {
    gap: 1.5rem;
}

.docs-menu-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    width: 44px;
    height: 44px;
    margin-left: -.375rem;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, .25);
    border-radius: .5rem;
    background: transparent;
    color: #ffffff;
    cursor: pointer;
}

.docs-menu-button:hover {
    border-color: rgba(255, 255, 255, .5);
    background-color: rgba(255, 255, 255, .08);
}

.docs-menu-button:focus-visible,
.docs-nav a:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: 2px;
}

.docs-menu-button svg {
    width: 20px;
    height: 20px;
}

.docs-menu-button .docs-icon-close {
    display: none;
}

.docs-brand {
    display: inline-flex;
    align-items: baseline;
    gap: .375rem;
    min-width: 0;
    font-family: var(--docs-font-display);
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
}

.docs-brand a {
    color: #ffffff;
    text-decoration: none;
}

.docs-brand a:hover {
    text-decoration: underline;
    text-underline-offset: 4px;
}

.docs-brand-sep {
    color: rgba(255, 255, 255, .5);
    font-weight: 400;
}

.docs-brand-docs {
    font-weight: 500;
}

.docs-nav-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.docs-nav-links a,
.docs-nav-login {
    color: rgba(255, 255, 255, .85);
    font-size: .875rem;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
}

.docs-nav-links a:hover,
.docs-nav-login:hover {
    color: #ffffff;
    text-decoration: underline;
    text-underline-offset: 4px;
}

.docs-nav-auth {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding-left: 1.5rem;
    border-left: 1px solid rgba(255, 255, 255, .2);
}

.docs-nav-cta {
    display: inline-flex;
    align-items: center;
    gap: .375rem;
    padding: .5rem .875rem;
    border-radius: .5rem;
    background-color: #ffffff;
    color: var(--docs-blue-700);
    font-size: .875rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .12);
}

.docs-nav-cta:hover {
    background-color: var(--docs-blue-50);
}

.docs-nav-cta svg {
    width: 16px;
    height: 16px;
}

/* The call to action reads "Start free with GitHub", like the site header;
   where the bar runs out of room it shortens to "Start free" (see the media
   queries below). */
.docs-cta-short {
    display: none;
}

/* The version menu (only rendered when more than one version is published). */
.docs-version-button {
    background-color: #ffffff !important;
    color: var(--docs-blue-900) !important;
}

/* ------------------------------------------------------------------ sidebar */

.sidebar {
    background-color: var(--docs-sidebar-bg);
    border-right: 1px solid var(--docs-border);
    font-family: var(--docs-font-sans);
    /* LaRecipe starts the fixed sidebar 4rem down, under its own bar. */
    margin-top: var(--docs-nav-h);
    padding-bottom: 2rem;
    transition: left .2s ease, visibility .2s;
}

/* A collapsed sidebar sits off-screen; without this its links stay in the tab
   order and keyboard focus disappears into an invisible panel. */
.sidebar.is-hidden {
    visibility: hidden;
}

/* Opening shows the panel at once, so focus can move into it straight away;
   closing keeps it visible until it has slid out. */
.sidebar:not(.is-hidden) {
    transition: left .2s ease, visibility 0s;
}

.sidebar > ul > li > .sidebar-heading {
    padding: 1.25rem 1.25rem .5rem;
    margin: 0;
    color: #374151;
    font-family: var(--docs-font-mono);
    font-size: .75rem;
    font-weight: 500;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.sidebar > ul > li > ul {
    line-height: 1.5;
}

.sidebar > ul > li > ul > li a {
    padding: .4rem 1.25rem .4rem 1.75rem;
    color: var(--docs-muted);
    font-size: .9375rem;
    font-weight: 400;
    text-decoration: none;
}

.sidebar > ul > li > ul > li a:hover {
    padding-left: 1.75rem;
    color: var(--docs-blue-700);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.sidebar > ul > li > ul > li.is-active {
    position: relative;
    padding-left: 0;
}

.sidebar > ul > li > ul > li.is-active::before {
    top: 0;
    height: 100%;
    width: 3px;
    background: var(--docs-blue-700);
}

.sidebar > ul > li > ul > li.is-active a {
    color: var(--docs-blue-700);
    font-weight: 600;
}

/* Site links inside the drawer: phones only, where the top bar has no room. */
.docs-sidebar-site {
    display: none;
}

.docs-backdrop {
    display: none;
}

/* ------------------------------------------------------------------ content */

.documentation {
    margin-top: 7rem;
    margin-bottom: 3rem;
    font-family: var(--docs-font-sans);
    font-size: 1rem;
    line-height: 1.7;
    color: var(--docs-text);
}

.documentation:focus {
    outline: none;
}

.documentation h1,
.documentation h2,
.documentation h3,
.documentation h4 {
    font-family: var(--docs-font-display);
    color: var(--docs-heading);
    letter-spacing: -.01em;
}

.documentation h1 {
    margin: 0 0 1.25rem;
    font-size: 2.25rem;
    line-height: 1.15;
    font-weight: 700;
}

.documentation h1:first-of-type {
    border-left: 3px solid var(--docs-blue-700);
    padding-left: 1rem;
}

.documentation h2 {
    margin-top: 2.75rem;
    margin-bottom: .875rem;
    font-size: 1.5rem;
    line-height: 1.3;
    font-weight: 600;
}

.documentation h2 a,
.documentation h2 a:hover {
    color: var(--docs-heading);
    text-decoration: none;
}

.documentation h2 a::before {
    color: var(--docs-blue-700);
    opacity: .55;
}

.documentation h3 {
    margin-top: 2rem;
    margin-bottom: .75rem;
    font-size: 1.2rem;
    font-weight: 600;
}

.documentation p {
    margin: 0 0 1rem;
    font-size: 1rem;
    line-height: 1.7;
}

.documentation ul,
.documentation ol {
    margin: 0 0 1.25rem;
    padding-left: 1.5rem;
}

.documentation ol > li,
.documentation ul > li {
    padding-top: .25rem;
    padding-bottom: .25rem;
    line-height: 1.7;
}

.documentation hr {
    margin: 1rem 0 1.5rem;
    border: 0;
    border-top: 1px solid var(--docs-border);
}

.documentation strong {
    font-weight: 600;
    color: var(--docs-heading);
}

/* Body links: blue-700 and underlined, never colour alone. */
.documentation p a,
.documentation li a,
.documentation td a,
.documentation blockquote a {
    color: var(--docs-blue-700);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

.documentation p a:hover,
.documentation li a:hover,
.documentation td a:hover,
.documentation blockquote a:hover {
    color: var(--docs-blue-800);
    text-decoration-thickness: 2px;
}

.documentation :not(pre) > code {
    padding: .1rem .375rem;
    border-radius: .25rem;
    background-color: #f1f5f9;
    color: var(--docs-blue-900);
    font-family: var(--docs-font-mono);
    font-size: .875em;
    line-height: 1.6;
}

/* "On this page": LaRecipe pins the page's first list to the right edge. */
.documentation > ul:first-of-type {
    margin: 0;
    padding: 0;
}

.documentation > ul:first-of-type li {
    padding: .5rem .75rem;
    border-bottom: 1px dashed var(--docs-border);
}

.documentation > ul:first-of-type li a {
    color: var(--docs-toc);
    font-size: .875rem;
    text-decoration: none;
}

.documentation > ul:first-of-type li a:hover {
    color: var(--docs-blue-700);
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* Tables: light borders like the marketing pages, no floating card shadow. */
.documentation table {
    width: 100%;
    margin: 1.25rem 0 1.75rem;
    padding: 0;
    border-collapse: collapse;
    border: 1px solid var(--docs-border);
    box-shadow: none;
    font-size: .9375rem;
    line-height: 1.55;
}

.documentation table:hover {
    box-shadow: none;
}

.documentation table th,
.documentation table td {
    padding: .625rem .875rem;
    border: 1px solid var(--docs-border);
    text-align: left;
    vertical-align: top;
}

.documentation table th {
    background-color: #f9fafb;
    color: var(--docs-heading);
    font-weight: 600;
}

.documentation table td:hover,
.documentation table th:hover,
.documentation table tr:hover {
    background-color: transparent;
}

/* Callouts (> {primary} ...): tinted, bordered boxes with dark text. LaRecipe
   injects a white SVG icon pinned half outside the box; recolour it and pull it
   inside so it is neither invisible nor clipped. */
.documentation blockquote {
    margin: 1.5rem 0;
}

.documentation .alert {
    margin: 1.75rem 0;
    padding: 1rem 1.25rem;
    border: 1px solid var(--docs-blue-200);
    border-radius: .75rem;
    background-color: var(--docs-blue-50);
    box-shadow: none;
    color: var(--docs-blue-900);
    overflow: visible;
}

.documentation .alert:hover {
    box-shadow: none;
}

.documentation .alert p {
    margin: 0;
    padding-left: 2rem;
    color: inherit;
    line-height: 1.65;
}

.documentation .alert p + p {
    margin-top: .5rem;
}

.documentation .alert strong {
    color: inherit;
}

.documentation .alert a {
    color: inherit;
}

.documentation .alert .icon {
    position: absolute;
    top: 1.1rem;
    left: 1.25rem;
    width: 1.25rem;
    height: 1.25rem;
    opacity: 1;
}

.documentation .alert .icon .svg,
.documentation .alert .icon svg {
    display: block;
    width: 1.25rem;
    height: 1.25rem;
}

.documentation .alert .icon svg,
.documentation .alert .icon svg * {
    fill: var(--docs-blue-700);
}

.documentation .alert.is-success {
    border-color: #bbf7d0;
    background-color: #f0fdf4;
    color: #14532d;
}

.documentation .alert.is-success .icon svg,
.documentation .alert.is-success .icon svg * {
    fill: #15803d;
}

.documentation .alert.is-danger {
    border-color: #fecaca;
    background-color: #fef2f2;
    color: #7f1d1d;
}

.documentation .alert.is-danger .icon svg,
.documentation .alert.is-danger .icon svg * {
    fill: #b91c1c;
}

.documentation .alert.is-warning {
    border-color: #fde68a;
    background-color: #fffbeb;
    color: #78350f;
}

.documentation .alert.is-warning .icon svg,
.documentation .alert.is-warning .icon svg * {
    fill: #b45309;
}

.documentation .alert.is-info {
    border-color: #e2e8f0;
    background-color: #f8fafc;
    color: #1e293b;
}

.documentation .alert.is-info .icon svg,
.documentation .alert.is-info .icon svg * {
    fill: #475569;
}

/* Label pills: the same look as the marketing and dashboard pills. */
.docs-pill {
    display: inline-flex;
    align-items: center;
    gap: .375rem;
    padding: .0625rem .625rem;
    border-radius: 9999px;
    font-family: var(--docs-font-sans);
    font-size: .8125rem;
    font-weight: 500;
    line-height: 1.6;
    white-space: nowrap;
    vertical-align: baseline;
}

.docs-pill::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 9999px;
    background-color: currentColor;
}

.docs-pill.is-solid {
    background-color: #ecfdf5;
    color: #047857;
    box-shadow: inset 0 0 0 1px rgba(5, 150, 105, .2);
}

.docs-pill.is-solid::before {
    background-color: #10b981;
}

.docs-pill.is-closer {
    background-color: #fffbeb;
    color: #b45309;
    box-shadow: inset 0 0 0 1px rgba(217, 119, 6, .2);
}

.docs-pill.is-closer::before {
    background-color: #f59e0b;
}

.docs-pill.is-attention {
    background-color: #fff1f2;
    color: #be123c;
    box-shadow: inset 0 0 0 1px rgba(225, 29, 72, .2);
}

.docs-pill.is-attention::before {
    background-color: #f43f5e;
}

.docs-pill.is-unverified {
    background-color: #f8fafc;
    color: #475569;
    box-shadow: inset 0 0 0 1px rgba(71, 85, 105, .2);
}

.docs-pill.is-unverified::before {
    background-color: #94a3b8;
}

.docs-label-list {
    list-style: none;
    padding-left: 0 !important;
}

/* The three labels, one block each: a three-column table squeezed the
   explanations into one-word lines on a phone. */
.docs-label-defs {
    margin: 1.25rem 0 1.5rem;
    border: 1px solid var(--docs-border);
    border-radius: .75rem;
}

.docs-label-defs > li {
    padding: 1rem 1.25rem !important;
}

.docs-label-defs > li + li {
    border-top: 1px solid var(--docs-border);
}

.docs-label-defs > li p {
    margin: .5rem 0 0;
}

/* ------------------------------------------------------------------- footer */

.docs-footer {
    width: 75%;
    padding-left: 20rem;
    margin-bottom: 3rem;
    font-family: var(--docs-font-sans);
    transition: padding-left .2s;
}

.docs-footer.expanded {
    padding-left: 5rem;
}

.docs-footer-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .75rem 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--docs-border);
    color: var(--docs-muted);
    font-size: .875rem;
}

.docs-footer nav {
    display: flex;
    flex-wrap: wrap;
    gap: .25rem 1.25rem;
}

.docs-footer a {
    color: var(--docs-muted);
    text-decoration: underline;
    text-decoration-color: rgba(75, 85, 99, .35);
    text-underline-offset: 3px;
}

.docs-footer a:hover {
    color: var(--docs-blue-700);
    text-decoration-color: currentColor;
}

/* ---------------------------------------------------------------------- 404 */

.docs-404 h1 {
    font-size: 3rem;
}

.docs-404-links {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem 1.5rem;
}

/* ------------------------------------------- mid widths: TOC above content */

@media (min-width: 781px) and (max-width: 1100px) {
    .documentation {
        width: 100%;
        padding-right: 2.5rem;
    }

    .documentation > ul:first-of-type {
        position: static;
        width: auto;
    }

    .docs-footer {
        width: 100%;
        padding-right: 2.5rem;
    }
}

@media (max-width: 1100px) {
    /* Five site links, "Sign in" and the call to action: below 1100px the
       full label no longer fits beside them, so the bar tightens and the
       button reads "Start free". */
    .docs-nav-end,
    .docs-nav-links {
        gap: 1rem;
    }

    .docs-nav-auth {
        padding-left: 1rem;
    }

    .docs-cta-long {
        display: none;
    }

    .docs-cta-short {
        display: inline;
    }

    /* Signed in there is no "Sign in" link beside the button, so the full
       "Open your dashboard" fits down to phone widths (see below). */
    .docs-nav-cta-member .docs-cta-long {
        display: inline;
    }

    .docs-nav-cta-member .docs-cta-short {
        display: none;
    }

    .documentation > ul:first-of-type {
        margin: 0 0 2rem;
        padding: .75rem 1rem;
        border: 1px solid var(--docs-border);
        border-radius: .75rem;
        background-color: #f9fafb;
    }

    .documentation > ul:first-of-type::before {
        content: "On this page";
        display: block;
        padding: .25rem .75rem .5rem;
        color: #374151;
        font-family: var(--docs-font-mono);
        font-size: .75rem;
        font-weight: 500;
        letter-spacing: .06em;
        text-transform: uppercase;
    }

    .documentation > ul:first-of-type li {
        padding: .375rem .75rem;
    }

    .documentation > ul:first-of-type li:last-child {
        border-bottom: 0;
    }
}

/* ------------------------------------------------- phones, portrait tablets */

@media (max-width: 780px) {
    .docs-nav {
        padding: 0 .75rem 0 1rem;
        gap: .5rem;
    }

    .docs-nav-links,
    .docs-nav-login {
        display: none;
    }

    .docs-nav-auth {
        padding-left: 0;
        border-left: 0;
    }

    .docs-nav-cta svg {
        display: none;
    }

    /* Beside the menu button and "GitAlert / Docs", "Open your dashboard"
       ran into "Docs" and to within 5px of the screen edge at 375px. */
    .docs-nav-cta-member .docs-cta-long {
        display: none;
    }

    .docs-nav-cta-member .docs-cta-short {
        display: inline;
    }

    .docs-menu-button[aria-expanded="true"] .docs-icon-open {
        display: none;
    }

    .docs-menu-button[aria-expanded="true"] .docs-icon-close {
        display: block;
    }

    /* The open sidebar is an overlay drawer on a phone, above a backdrop. */
    .sidebar {
        z-index: 35;
        width: 16rem;
        max-width: 85vw;
        box-shadow: 0 10px 30px rgba(15, 23, 42, .18);
        overscroll-behavior: contain;
    }

    .sidebar.is-hidden {
        left: -17rem;
        box-shadow: none;
    }

    /* The page behind an open drawer stays put; the drawer script sets the
       class. The drawer's overscroll-behavior keeps a scroll that reaches its
       end from passing on to the page. */
    html.docs-drawer-open,
    html.docs-drawer-open body {
        overflow: hidden;
    }

    .docs-backdrop {
        display: block;
        position: fixed;
        top: var(--docs-nav-h);
        right: 0;
        bottom: 0;
        left: 0;
        z-index: 30;
        background-color: rgba(17, 24, 39, .45);
    }

    .docs-sidebar-site {
        display: block;
        margin: 1rem 0 0;
        padding: 0;
        list-style: none;
        border-top: 1px solid var(--docs-border);
    }

    .docs-sidebar-site .sidebar-heading {
        padding: 1.25rem 1.25rem .5rem;
        margin: 0;
        color: #374151;
        font-family: var(--docs-font-mono);
        font-size: .75rem;
        font-weight: 500;
        letter-spacing: .06em;
        text-transform: uppercase;
    }

    .docs-sidebar-site a {
        display: block;
        padding: .5rem 1.25rem .5rem 1.75rem;
        color: var(--docs-muted);
        font-size: .9375rem;
        text-decoration: none;
    }

    .docs-sidebar-site a:hover {
        color: var(--docs-blue-700);
        text-decoration: underline;
    }

    .documentation {
        width: 100%;
        margin-top: 5.5rem;
        padding: 0 16px !important;
    }

    .documentation h1 {
        font-size: 1.875rem;
    }

    .documentation h2 {
        font-size: 1.3rem;
    }

    /* The "#" anchor marker hangs in the left margin, which a phone does not have. */
    .documentation h2 a::before {
        display: none;
    }

    .documentation > ul:first-of-type {
        position: static;
        width: auto;
    }

    /* A wide table scrolls inside itself instead of widening the page. */
    .documentation table {
        display: block;
        max-width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .documentation :not(pre) > code {
        word-break: break-word;
    }

    .documentation .alert {
        padding: .875rem 1rem;
    }

    .documentation .alert .icon {
        top: 1rem;
        left: 1rem;
    }

    .documentation .alert p {
        padding-left: 1.875rem;
    }

    .docs-footer,
    .docs-footer.expanded {
        width: 100%;
        padding: 0 16px;
    }
}

@media (max-width: 360px) {
    .docs-brand {
        font-size: 1.125rem;
    }

    .docs-nav-cta {
        padding: .5rem .625rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .sidebar,
    .documentation,
    .docs-footer {
        transition: none !important;
    }
}
