/* run.events styling for the Scalar API reference on /swagger (ApiReference/ApiReferencePage.cs) */

/* ---------- Fonts (self-hosted, SIL Open Font License) ---------- */
@font-face {
    font-family: "Figtree";
    font-style: normal;
    font-display: swap;
    font-weight: 300 900;
    src: url("/fonts/figtree-latin-wght-normal.woff2") format("woff2-variations");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: "Figtree";
    font-style: normal;
    font-display: swap;
    font-weight: 300 900;
    src: url("/fonts/figtree-latin-ext-wght-normal.woff2") format("woff2-variations");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: "JetBrains Mono";
    font-style: normal;
    font-display: swap;
    font-weight: 100 800;
    src: url("/fonts/jetbrains-mono-latin-wght-normal.woff2") format("woff2-variations");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: "JetBrains Mono";
    font-style: normal;
    font-display: swap;
    font-weight: 100 800;
    src: url("/fonts/jetbrains-mono-latin-ext-wght-normal.woff2") format("woff2-variations");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------- Brand ---------- */
:root {
    --re-purple: #6A4A9E;
    --re-red: #EE265A;
    --re-cyan: #7BCED7;
    --re-yellow: #F7CC16;
    --re-hero-height: 64px;
    --re-stripe-height: 8px;
    --scalar-custom-header-height: calc(var(--re-hero-height) + var(--re-stripe-height));
}

/* Light mode */
.light-mode {
    --scalar-font: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --scalar-font-code: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

    --scalar-color-1: #22183A;
    --scalar-color-2: #62587A;
    --scalar-color-3: #857C9C;
    --scalar-color-accent: #6A4A9E;

    --scalar-background-1: #FBFAFD;
    --scalar-background-2: #F2EDF9;
    --scalar-background-3: #E7E1F0;
    --scalar-background-accent: #F2EDF9;
    --scalar-border-color: #E7E1F0;

    --scalar-link-color: #6A4A9E;
    --scalar-link-color-hover: #C8184A;

    --scalar-button-1: #6A4A9E;
    --scalar-button-1-color: #FFFFFF;
    --scalar-button-1-hover: #5A3D88;

    /* Status and semantic colours: success cyan, errors red, warnings yellow */
    --scalar-color-green: #1C7A84;
    --scalar-color-blue: #6A4A9E;
    --scalar-color-orange: #8A6A00;
    --scalar-color-yellow: #8A6A00;
    --scalar-color-red: #C8184A;
    --scalar-color-purple: #6A4A9E;

    --scalar-sidebar-background-1: #FFFFFF;
    --scalar-sidebar-color-1: #22183A;
    --scalar-sidebar-color-2: #62587A;
    --scalar-sidebar-border-color: #E7E1F0;
    --scalar-sidebar-item-hover-background: #F2EDF9;
    --scalar-sidebar-item-hover-color: #22183A;
    --scalar-sidebar-item-active-background: #F2EDF9;
    --scalar-sidebar-color-active: #22183A;
    --scalar-sidebar-indent-border-active: #EE265A;
    --scalar-sidebar-search-background: #FBFAFD;
    --scalar-sidebar-search-border-color: #E7E1F0;
    --scalar-sidebar-search-color: #62587A;

    --scalar-radius: 7px;
    --scalar-radius-lg: 12px;
    --scalar-radius-xl: 14px;

    /* Method colours: POST red, GET cyan, PUT yellow (reference style) */
    --re-post-bg: #EE265A;
    --re-post-ink: #FFFFFF;
    --re-post-text: #C8184A;
    --re-get-bg: #7BCED7;
    --re-get-ink: #15292D;
    --re-get-text: #1C7A84;
    --re-put-bg: #F7CC16;
    --re-put-ink: #3A2E00;
    --re-put-text: #8A6A00;
}

/* Dark mode */
.dark-mode {
    --scalar-font: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --scalar-font-code: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

    --scalar-color-1: #F1ECF8;
    --scalar-color-2: #B4A9C8;
    --scalar-color-3: #8F84A6;
    --scalar-color-accent: #B69BE6;

    --scalar-background-1: #161020;
    --scalar-background-2: #1F172D;
    --scalar-background-3: #2A2040;
    --scalar-background-accent: #2A2040;
    --scalar-border-color: #352A48;

    --scalar-link-color: #B69BE6;
    --scalar-link-color-hover: #FF6B8F;

    --scalar-button-1: #6A4A9E;
    --scalar-button-1-color: #FFFFFF;
    --scalar-button-1-hover: #7C5CB2;

    --scalar-color-green: #7BCED7;
    --scalar-color-blue: #B69BE6;
    --scalar-color-orange: #F7CC16;
    --scalar-color-yellow: #F7CC16;
    --scalar-color-red: #FF6B8F;
    --scalar-color-purple: #B69BE6;

    --scalar-sidebar-background-1: #1F172D;
    --scalar-sidebar-color-1: #F1ECF8;
    --scalar-sidebar-color-2: #B4A9C8;
    --scalar-sidebar-border-color: #352A48;
    --scalar-sidebar-item-hover-background: #2A2040;
    --scalar-sidebar-item-hover-color: #F1ECF8;
    --scalar-sidebar-item-active-background: #2A2040;
    --scalar-sidebar-color-active: #F1ECF8;
    --scalar-sidebar-indent-border-active: #FF6B8F;
    --scalar-sidebar-search-background: #161020;
    --scalar-sidebar-search-border-color: #352A48;
    --scalar-sidebar-search-color: #B4A9C8;

    --scalar-radius: 7px;
    --scalar-radius-lg: 12px;
    --scalar-radius-xl: 14px;

    --re-post-bg: #EE265A;
    --re-post-ink: #FFFFFF;
    --re-post-text: #FF6B8F;
    --re-get-bg: #7BCED7;
    --re-get-ink: #15292D;
    --re-get-text: #7BCED7;
    --re-put-bg: #F7CC16;
    --re-put-ink: #3A2E00;
    --re-put-text: #F7CC16;
}

body {
    font-family: var(--scalar-font);
    -webkit-font-smoothing: antialiased;
}

/* Keyboard focus ring on controls only; Scalar focuses whole sections (tabindex="-1") when it navigates */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible,
[role="button"]:focus-visible,
[role="tab"]:focus-visible,
[role="option"]:focus-visible,
[role="switch"]:focus-visible {
    outline: 3px solid var(--re-yellow) !important;
    outline-offset: 2px;
}
[tabindex="-1"]:focus,
[tabindex="-1"]:focus-visible {
    outline: none !important;
}

/* ---------- Header (hero bar and colour stripe) ---------- */
.re-header {
    position: sticky;
    top: 0;
    z-index: 1000;
}
.re-hero {
    position: relative;
    overflow: hidden;
    height: var(--re-hero-height);
    background: var(--re-purple);
    color: #FFFFFF;
}
.dark-mode .re-hero {
    background: #4E3578;
}
.re-hero-inner {
    position: relative;
    z-index: 1;
    height: 100%;
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 0 24px;
}
.re-wordmark {
    display: inline-flex;
    align-items: center;
}
.re-wordmark img {
    display: block;
    height: 26px;
    width: auto;
}
.re-hero-label {
    font-family: var(--scalar-font);
    font-weight: 700;
    font-size: 15px;
    letter-spacing: -0.01em;
    padding-left: 18px;
    border-left: 1px solid rgba(255, 255, 255, 0.35);
    opacity: 0.92;
}
.re-hero-arcs {
    position: absolute;
    right: 24px;
    top: -44px;
    width: 320px;
    height: 320px;
    z-index: 0;
    pointer-events: none;
}
.re-stripe {
    display: grid;
    grid-template-columns: 4fr 1fr 2fr 1fr;
    height: var(--re-stripe-height);
}
.re-stripe span:nth-child(1) { background: var(--re-purple); }
.re-stripe span:nth-child(2) { background: var(--re-red); }
.re-stripe span:nth-child(3) { background: var(--re-cyan); }
.re-stripe span:nth-child(4) { background: var(--re-yellow); }

@media (max-width: 760px) {
    .re-hero-arcs { opacity: 0.35; }
    .re-hero-label { display: none; }
}

/* ---------- Headings ---------- */
.scalar-app h1,
.scalar-app h2 {
    font-weight: 800;
    letter-spacing: -0.025em;
}
.scalar-app h3 {
    font-weight: 800;
    letter-spacing: -0.01em;
}

/* ---------- Method badges ---------- */
/* Sidebar: filled badges as in the brand style */
.sidebar-heading-type {
    min-width: 40px;
    padding: 1px 6px;
    border-radius: 6px;
    text-align: center;
    background: var(--method-color);
    color: #FFFFFF !important;
}
.sidebar-heading-type--post { --method-color: var(--re-post-bg) !important; color: var(--re-post-ink) !important; }
.sidebar-heading-type--get  { --method-color: var(--re-get-bg) !important;  color: var(--re-get-ink) !important; }
.sidebar-heading-type--put  { --method-color: var(--re-put-bg) !important;  color: var(--re-put-ink) !important; }

/* Operation lists and request cards: method text in the brand colours */
.endpoint-method[style*="--scalar-color-green"],
.request-method[style*="--scalar-color-green"] { color: var(--re-post-text) !important; }
.endpoint-method[style*="--scalar-color-blue"],
.request-method[style*="--scalar-color-blue"]  { color: var(--re-get-text) !important; }
.endpoint-method[style*="--scalar-color-orange"],
.request-method[style*="--scalar-color-orange"] { color: var(--re-put-text) !important; }

/* Request client address bar */
.font-code.text-3xs.border-r.text-green  { color: var(--re-post-text) !important; }
.font-code.text-3xs.border-r.text-blue   { color: var(--re-get-text) !important; }
.font-code.text-3xs.border-r.text-orange { color: var(--re-put-text) !important; }

/* ---------- Cards ---------- */
.scalar-card,
.request-card {
    border-radius: var(--scalar-radius-xl) !important;
}

/* ---------- Selection and scrollbars ---------- */
::selection { background: #F7CC16; color: #22183A; }
.light-mode { --scalar-scrollbar-color: #D8CEEA; --scalar-scrollbar-color-active: #6A4A9E; }
.dark-mode  { --scalar-scrollbar-color: #3A2E52; --scalar-scrollbar-color-active: #B69BE6; }

/* ---------- Introduction as a hero ---------- */
section.introduction-section {
    position: relative;
    margin-top: 36px !important;
    padding: 56px 48px 52px !important;
    border-radius: 24px;
    overflow: hidden;
    background:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 560 560'%3E%3Ccircle cx='280' cy='280' r='250' fill='none' stroke='%237BCED7' stroke-width='44' stroke-dasharray='520 1100' stroke-linecap='round' transform='rotate(95 280 280)'/%3E%3Ccircle cx='280' cy='280' r='180' fill='none' stroke='%23EE265A' stroke-width='44' stroke-dasharray='330 900' stroke-linecap='round' transform='rotate(150 280 280)'/%3E%3Ccircle cx='280' cy='280' r='110' fill='none' stroke='%23F7CC16' stroke-width='44' stroke-dasharray='190 600' stroke-linecap='round' transform='rotate(200 280 280)'/%3E%3C/svg%3E") no-repeat right -150px bottom -330px / 560px 560px,
        #6A4A9E;
    --scalar-color-1: #FFFFFF;
    --scalar-color-2: rgba(255, 255, 255, 0.88);
    --scalar-color-3: rgba(255, 255, 255, 0.72);
    --scalar-link-color: #FFFFFF;
    --scalar-link-color-hover: #F7CC16;
    --scalar-border-color: rgba(255, 255, 255, 0.28);
    --scalar-background-2: rgba(255, 255, 255, 0.14);
}
.dark-mode section.introduction-section { background-color: #4E3578; }
section.introduction-section h1.section-header-label {
    font-size: clamp(2.3rem, 4.2vw, 3.6rem);
    line-height: 1.02;
    font-weight: 900;
    letter-spacing: -0.035em;
}
section.introduction-section .badge {
    color: #FFFFFF;
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.3);
    font-family: var(--scalar-font-code);
    font-size: 12px;
}
/* The client card keeps the normal palette on the purple hero */
.light-mode section.introduction-section .introduction-card {
    --scalar-color-1: #22183A;
    --scalar-color-2: #62587A;
    --scalar-color-3: #857C9C;
    --scalar-link-color: #6A4A9E;
    --scalar-border-color: #E7E1F0;
    --scalar-background-2: #F2EDF9;
}
.dark-mode section.introduction-section .introduction-card {
    --scalar-color-1: #F1ECF8;
    --scalar-color-2: #B4A9C8;
    --scalar-color-3: #8F84A6;
    --scalar-link-color: #B69BE6;
    --scalar-border-color: #352A48;
    --scalar-background-2: #1F172D;
}
section.introduction-section .introduction-card {
    background: var(--scalar-background-1);
    border-radius: 16px;
    box-shadow: 0 18px 44px rgba(20, 10, 40, 0.28);
}

/* ---------- Tag headings: brand stripe under the title ---------- */
section[id*="/tag/"] > .section-header-wrapper h2.section-header-label {
    font-size: clamp(1.6rem, 2.6vw, 2.1rem);
    font-weight: 800;
    letter-spacing: -0.025em;
}
section[id*="/tag/"] > .section-header-wrapper h2.section-header-label::after {
    content: "";
    display: block;
    width: 80px;
    height: 6px;
    margin-top: 14px;
    border-radius: 3px;
    background: linear-gradient(90deg, #6A4A9E 0 50%, #EE265A 50% 62.5%, #7BCED7 62.5% 87.5%, #F7CC16 87.5% 100%);
}
.operation-title h3.section-header-label {
    font-weight: 800;
    letter-spacing: -0.02em;
}

/* ---------- Code cards: ink background and window dots ---------- */
.light-mode .scalar-card.dark-mode,
.light-mode .request-card.dark-mode {
    --scalar-background-1: #22183A;
    --scalar-background-2: #2B1F47;
    --scalar-background-3: #342656;
    --scalar-border-color: rgba(255, 255, 255, 0.08);
}
.request-card .scalar-card-header::before {
    content: "";
    flex: none;
    align-self: center;
    width: 46px;
    height: 10px;
    margin-right: 12px;
    background:
        radial-gradient(circle at 5px 5px, #EE265A 4.5px, transparent 5px),
        radial-gradient(circle at 23px 5px, #F7CC16 4.5px, transparent 5px),
        radial-gradient(circle at 41px 5px, #7BCED7 4.5px, transparent 5px);
}

section.introduction-section .introduction-description .markdown h1 {
    color: #FFFFFF;
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}
section.introduction-section .introduction-description .markdown p {
    font-size: 1.08rem;
    line-height: 1.6;
    max-width: 58ch;
}
section.introduction-section button.download-button {
    display: inline-flex;
    align-items: center;
    padding: 7px 16px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.45);
    background: rgba(255, 255, 255, 0.1);
    color: #FFFFFF;
    font-weight: 700;
    text-decoration: none;
}
section.introduction-section button.download-button:hover {
    background: #FFFFFF;
    color: #6A4A9E;
}

/* ---------- Sidebar ---------- */
.t-doc__sidebar li.group\/sidebar-section > div {
    margin-top: 2px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--scalar-color-accent);
}
.t-doc__sidebar button:has(.sidebar-search-placeholder) {
    border-radius: 999px;
}

/* ---------- No links to Scalar's hosted API client (the request client on this page is used instead) ---------- */
a[href*="client.scalar.com"] {
    display: none !important;
}
