/*
 * Plus subscription badge styling for the Scalar API reference UI.
 *
 * .plus-badge              — shared base style for both badge placements
 * .plus-badge--header      — the larger badge rendered by Scalar's x-badges (top-right of endpoint detail)
 * .plus-badge--operation   — the smaller badge injected next to each endpoint path in the operations list
 */

:root {
    --font-condensed: roboto-condensed, roboto, sans-serif;
}

.plus-badge {
    /* font: var(--font-condensed); */
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    font-weight: 400;
    line-height: 1;
    border-radius: 0.66rem;
    color: #fff;
    background-color: rgb(3, 148, 17);
}

.plus-badge--header {
    /*
     * Scalar renders the x-badges header badge as its own .badge element with
     * scoped ([data-v-*]) rules and inline CSS variables, which out-specify our
     * base .plus-badge class. !important is required here so the header badge
     * matches the operations-list badge (white text, no border, same size).
     */
    font-size: 0.65rem !important;
    line-height: 1 !important;
    /* Vertical padding matches the operations-list badge height (~21.7px), which
       it gets from being stretched inside its flex row; the header badge has no
       such stretch, so we add the padding explicitly. */
    padding: 0.35rem 0.5rem !important;
    margin-left: 0.5rem;
    color: #fff !important;
    background-color: rgb(3, 148, 17) !important;
    border: 0 !important;
    border-radius: 0.66rem !important;
    display: inline-flex !important;
    align-items: center !important;
}

/*
 * Branding: place the Schedule Validator logo at the top-left of the Scalar
 * sidebar. Served from /images by UseStaticFiles. Theme-aware so the logo
 * stays legible whether the user is in Scalar's light or dark mode.
 */
aside[role="navigation"]::before {
    content: "";
    display: block;
    height: 2rem;
    margin: 0.75rem 0.75rem 0.25rem;
    background-repeat: no-repeat;
    background-position: left center;
    background-size: contain;
}

/* The "-light"/"-dark" suffix names the theme each logo is FOR: -light has dark
   text (legible on the light-mode white sidebar); -dark has white text (legible
   on the dark-mode sidebar). */
body.light-mode aside[role="navigation"]::before {
    background-image: url("/images/sv-logo-horiz-250w-light.png");
}

body.dark-mode aside[role="navigation"]::before {
    background-image: url("/images/sv-logo-horiz-250w-dark.png");
}

.plus-badge--operation {
    font-size: 0.65rem;
    padding: 0 0.5rem;
    margin-left: 0.5rem;
}
