/* evecookbook.com: small additions on top of Tabler. Colours come from Tabler's CSS variables,
   so everything follows the light/dark theme without separate rules. */

@font-face {
    font-family: "Inter Var";
    font-style: normal;
    font-display: swap;
    font-weight: 100 900;
    src: url("../libs/inter/inter-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: "Inter Var";
    font-style: normal;
    font-display: swap;
    font-weight: 100 900;
    src: url("../libs/inter/inter-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;
}

:root {
    --tblr-font-sans-serif: "Inter Var", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
}

body {
    font-feature-settings: "cv03", "cv04", "cv11", "tnum";
}

/* ---------- Navbar ---------- */

.navbar-brand .brand-logo {
    height: 3.25rem;
    width: 3.25rem;
    margin: -.625rem .5rem -.625rem 0;
    transition: transform .2s;
}

.navbar-brand:hover .brand-logo {
    transform: rotate(-8deg) scale(1.05);
}

/* The pan is black: give it a warm glow so it stands out on the dark navbar */
[data-bs-theme="dark"] .navbar-brand .brand-logo {
    filter: drop-shadow(0 0 1px rgba(255, 214, 170, .55)) drop-shadow(0 0 8px rgba(255, 140, 50, .45));
}

.brand-name {
    font-weight: 700;
    letter-spacing: -.01em;
}

.navbar .nav-link-title {
    white-space: nowrap;
}

/* Between lg and xl the full menu only fits without its icons */
@media (min-width: 992px) and (max-width: 1199.98px) {
    .navbar .navbar-collapse .nav-link-icon {
        display: none;
    }
}

/* The page has no page-header, so give the first card some air below the navbar */
.page-body {
    margin-top: 1.5rem;
}

.navbar .disabled-link {
    opacity: .5;
    cursor: not-allowed;
}

.sso-login img {
    display: block;
    border-radius: var(--tblr-border-radius);
}

.partner-badge {
    height: 3.5rem;
    opacity: .75;
    transition: opacity .15s;
}

.partner-badge:hover {
    opacity: 1;
}

/* ---------- Form ---------- */

#calculateHint {
    margin-left: auto;
}

#calculateHint + #calculateButton {
    margin-left: .75rem !important;
}

/* Autocomplete suggestions, styled as a Tabler dropdown */
.ecb-autocomplete {
    position: absolute;
    z-index: 1060;
    max-height: 20rem;
    overflow-y: auto;
    overflow-x: hidden;
    margin: 0;
    padding: .25rem 0;
    list-style: none;
    background: var(--tblr-bg-surface);
    border: var(--tblr-border-width) solid var(--tblr-border-color);
    border-radius: var(--tblr-border-radius);
    box-shadow: var(--tblr-box-shadow-dropdown);
    font-size: .875rem;
}

.ecb-autocomplete li {
    padding: .375rem .75rem;
    color: var(--tblr-body-color);
    cursor: pointer;
}

.ecb-autocomplete li:hover,
.ecb-autocomplete li.active {
    background: var(--tblr-primary-lt, rgba(var(--tblr-primary-rgb), .1));
    color: var(--tblr-primary);
}

/* ---------- Results ---------- */

.results-table td {
    white-space: nowrap;
}

.results-table th {
    white-space: normal;
    vertical-align: bottom;
}

.results-table td:nth-child(2) {
    white-space: normal;
    min-width: 9rem;
}

.results-table td.cell-wrap {
    white-space: normal;
    min-width: 7rem;
}

.results-table > :not(caption) > tr > * {
    padding-left: .625rem;
    padding-right: .625rem;
}

.item-icon {
    display: block;
    width: 32px;
    min-width: 32px;
    max-width: none; /* Tabler's max-width: 100% collapses it to 0 in a 1%-wide column */
    height: 32px;
    border-radius: var(--tblr-border-radius-sm);
}

.item-icon-lg {
    max-width: none;
    width: 64px;
    height: 64px;
    border-radius: var(--tblr-border-radius);
}

.card-warning {
    border-color: var(--tblr-warning);
}

.cost-summary dt {
    font-weight: 400;
    color: var(--tblr-secondary);
}

.cost-summary dd {
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

/* sortable.js marks sortable headers; show that they are clickable */
table.sortable thead th:not(.sorttable_nosort) {
    cursor: pointer;
    user-select: none;
}

table.sortable thead th:not(.sorttable_nosort):hover {
    color: var(--tblr-body-color);
}

#sorttable_sortfwdind,
#sorttable_sortrevind {
    color: var(--tblr-primary);
    margin-left: .25rem;
}

.recipe-step + .recipe-step {
    border-top: var(--tblr-border-width) solid var(--tblr-border-color);
}

.recipe-step-title {
    padding: .75rem 1rem;
    font-weight: 600;
    background: var(--tblr-bg-surface-secondary);
}

.btn-copied {
    color: var(--tblr-success) !important;
    border-color: var(--tblr-success) !important;
}

.btn-copied.btn-primary {
    color: #fff !important;
    background: var(--tblr-success) !important;
}

.btn-copy-failed {
    color: var(--tblr-danger) !important;
    border-color: var(--tblr-danger) !important;
}

.empty-start {
    padding-top: 2rem;
}

/* ---------- Job manager ---------- */

.slot-bar {
    max-width: 6rem;
    min-width: 3rem;
}

.job-progress {
    min-width: 5rem;
}

.job-loader-steps {
    position: relative;  /* offsetParent for jobManager.js's scrolling */
    max-height: 20rem;
    overflow-y: auto;
}

/* ---------- Modals ---------- */

/* Config: settings sidebar + content */
.config-modal .modal-body {
    display: flex;
    min-height: 26rem;
}

.config-modal .modal-body > .row {
    flex: 1;
    height: auto !important;
}

.config-nav {
    padding: 1rem;
    background: var(--tblr-bg-surface-secondary);
    border-right: var(--tblr-border-width) solid var(--tblr-border-color);
}

.config-nav .nav-link {
    display: flex;
    align-items: center;
    gap: .625rem;
    width: 100%;
    padding: .5rem .75rem;
    color: var(--tblr-secondary);
    text-align: left;
    border-radius: var(--tblr-border-radius);
}

.config-nav .nav-link:hover {
    color: var(--tblr-body-color);
    background: rgba(var(--tblr-body-color-rgb), .04);
}

.config-nav .nav-link.active {
    color: var(--tblr-primary);
    background: rgba(var(--tblr-primary-rgb), .12);
    font-weight: 600;
}

.config-nav .nav-link .ti {
    font-size: 1.125rem;
}

@media (max-width: 767.98px) {
    .config-nav {
        border-right: 0;
        border-bottom: var(--tblr-border-width) solid var(--tblr-border-color);
        overflow-x: auto;
    }

    .config-nav .nav {
        flex-wrap: nowrap;
    }

    .config-nav .nav-link {
        width: auto;
        white-space: nowrap;
    }
}

.config-content {
    padding: 1.25rem 1.5rem;
}

.config-heading {
    font-size: 1rem;
    margin-bottom: 1rem;
}

.setting-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: .875rem 0;
}

.setting-row + .setting-row,
.setting-detail + .setting-row {
    border-top: var(--tblr-border-width) solid var(--tblr-border-color);
}

.setting-title {
    font-weight: 600;
}

.setting-hint {
    color: var(--tblr-secondary);
    font-size: .8125rem;
    margin-top: .125rem;
}

.setting-detail {
    padding-bottom: 1rem;
}

/* Blacklist tag input: entries as removable badges */
.tag-input {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .375rem;
    min-height: 2.75rem;
    height: auto;
    padding: .375rem .5rem;
    cursor: text;
}

.tag-input:focus-within {
    border-color: var(--tblr-primary);
    box-shadow: 0 0 0 .25rem rgba(var(--tblr-primary-rgb), .25);
}

.tag-input .tag {
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    padding: .3125rem .375rem .3125rem .625rem;
    font-size: .8125rem;
    font-weight: 500;
    text-transform: none;
    letter-spacing: normal;
}

.tag-remove {
    display: inline-flex;
    padding: 0 .125rem;
    color: inherit;
    background: none;
    border: 0;
    border-radius: var(--tblr-border-radius-sm);
    opacity: .6;
    line-height: 1;
}

.tag-remove:hover {
    opacity: 1;
    background: rgba(var(--tblr-primary-rgb), .15);
}

.tag-input-field {
    flex: 1 0 10rem;
    min-width: 10rem;
    padding: .125rem .25rem;
    color: inherit;
    background: transparent;
    border: 0;
    outline: 0;
}

/* Skills: 0 to V segmented buttons */
.skill-list .list-group-item {
    background: transparent;
}

.skill-levels .btn {
    min-width: 2.25rem;
    padding-inline: .5rem;
    font-variant-numeric: tabular-nums;
}

.faq dt {
    font-weight: 600;
    margin-top: 1rem;
}

.faq dt:first-child {
    margin-top: 0;
}

.faq dd {
    color: var(--tblr-secondary);
    margin: .25rem 0 0;
}

.changelog-entry + .changelog-entry {
    margin-top: .75rem;
}

/* ---------- Analytics consent banner ---------- */

.consent-banner {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    left: 1rem;
    z-index: 1040;
    max-width: 44rem;
    margin: 0 auto;
    box-shadow: var(--tblr-box-shadow-dropdown);
}

.consent-banner[hidden] {
    display: none;
}

/* Items with no Jita market price */
.row-unpriced > td {
    --tblr-table-bg-type: rgba(var(--tblr-warning-rgb), .12);
    --tblr-table-accent-bg: transparent;
}

/* Totals row: a hairline above, nothing below */
.card-table tfoot td {
    border-top: var(--tblr-border-width) solid var(--tblr-border-color);
    border-bottom-width: 0;
}

/* Keep the last column clear of the card border, also when the table scrolls sideways */
.card-table > :not(caption) > tr > :last-child {
    padding-right: 1.5rem;
}

.card-table > :not(caption) > tr > :first-child {
    padding-left: 1.5rem;
}

.skill-list .list-group-item {
    padding-top: .5rem;
    padding-bottom: .5rem;
}

.skill-levels .btn-check:checked + .btn {
    color: #fff;
    background: var(--tblr-primary);
    border-color: var(--tblr-primary);
}

/* Keep the settings menu in view while a long tab (skills) scrolls */
.config-nav .nav {
    position: sticky;
    top: 0;
}

/* ---------- Terms and privacy ---------- */

.legal {
    color: var(--tblr-secondary);
    line-height: 1.65;
}

.legal h3 {
    color: var(--tblr-body-color);
    font-size: 1rem;
    margin: 1.75rem 0 .5rem;
    scroll-margin-top: 1rem;
}

.legal p,
.legal ul,
.legal ol {
    margin-bottom: .75rem;
}

.legal li + li {
    margin-top: .375rem;
}

.legal strong {
    color: var(--tblr-body-color);
}

.legal-updated {
    display: inline-flex;
    align-items: center;
    gap: .375rem;
    padding: .25rem .625rem;
    font-size: .8125rem;
    color: var(--tblr-secondary);
    background: var(--tblr-bg-surface-secondary);
    border-radius: var(--tblr-border-radius-pill);
}

.legal-toc {
    padding: .875rem 1rem .5rem;
    margin: 1rem 0 .5rem;
    background: var(--tblr-bg-surface-secondary);
    border-radius: var(--tblr-border-radius);
}

.legal-toc-title {
    font-weight: 600;
    color: var(--tblr-body-color);
    margin-bottom: .375rem;
}

.legal-card {
    max-width: 52rem;
    margin: 0 auto;
}

.legal-card .card-body {
    padding: 1.5rem 2rem 2rem;
}

/* Longer explanations in tooltips (Bootstrap's default is 200px) */
.tooltip-wide {
    --tblr-tooltip-max-width: 320px;
    --bs-tooltip-max-width: 320px;
}

.tooltip-wide .tooltip-inner {
    text-align: left;
}

/* ---------- Outline flyout ---------- */

/* Jump targets stop below the sticky navbar instead of under it */
[data-outline],
.recipe-step {
    scroll-margin-top: 5rem;
}

.outline {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    z-index: 1030;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: .625rem;
    max-width: calc(100vw - 2rem);
}

.outline[hidden],
.outline-panel[hidden] {
    display: none;
}

.outline-toggle {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    max-width: min(22rem, calc(100vw - 2rem));
    padding: .5rem .875rem;
    font-size: .875rem;
    font-weight: 600;
    color: #fff;
    background: var(--tblr-primary);
    border: 0;
    border-radius: var(--tblr-border-radius-pill);
    box-shadow: var(--tblr-box-shadow-dropdown);
    transition: filter .15s, transform .15s;
}

.outline-toggle:hover {
    filter: brightness(1.1);
}

.outline-toggle:active {
    transform: scale(.98);
}

.outline-toggle:focus-visible,
.outline-link:focus-visible {
    outline: 2px solid var(--tblr-primary);
    outline-offset: 2px;
}

.outline-toggle .ti {
    font-size: 1.125rem;
}

.outline-toggle-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.outline-panel {
    display: flex;
    flex-direction: column;
    width: 22rem;
    max-width: 100%;
    max-height: min(34rem, calc(100vh - 9rem));
    background: var(--tblr-bg-surface);
    border: var(--tblr-border-width) solid var(--tblr-border-color);
    border-radius: var(--tblr-border-radius-lg, var(--tblr-border-radius));
    box-shadow: var(--tblr-box-shadow-dropdown);
    overflow: hidden;
    animation: outline-in .14s ease-out;
}

@keyframes outline-in {
    from { opacity: 0; transform: translateY(.5rem); }
}

.outline-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .75rem 1rem .625rem;
}

.outline-title {
    font-weight: 600;
}

.outline-progress {
    height: 3px;
    background: var(--tblr-border-color);
}

.outline-progress-bar {
    width: 0;
    height: 100%;
    background: var(--tblr-primary);
    transition: width .2s;
}

.outline-list,
.outline-steps {
    margin: 0;
    padding: 0;
    list-style: none;
}

.outline-list {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: .375rem;
    overscroll-behavior: contain;
}

.outline-steps {
    margin: .125rem 0 .375rem 1.125rem;
    padding-left: .5rem;
    border-left: var(--tblr-border-width) solid var(--tblr-border-color);
}

.outline-link {
    display: flex;
    align-items: center;
    gap: .625rem;
    width: 100%;
    padding: .4375rem .625rem;
    font-size: .875rem;
    text-align: left;
    color: var(--tblr-body-color);
    background: none;
    border: 0;
    border-radius: var(--tblr-border-radius);
}

.outline-link:hover {
    background: rgba(var(--tblr-body-color-rgb), .06);
}

.outline-link.active {
    color: var(--tblr-primary);
    background: rgba(var(--tblr-primary-rgb), .12);
    font-weight: 600;
}

.outline-link > .ti {
    flex: none;
    font-size: 1.125rem;
    color: var(--tblr-secondary);
}

.outline-link.active > .ti {
    color: inherit;
}

.outline-name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.outline-count,
.outline-qty {
    flex: none;
    font-size: .75rem;
    font-weight: 400;
    color: var(--tblr-secondary);
    font-variant-numeric: tabular-nums;
}

.outline-step {
    padding-block: .3125rem;
    font-size: .8125rem;
}

.outline-num {
    flex: none;
    min-width: 1.25rem;
    font-size: .6875rem;
    font-weight: 600;
    text-align: center;
    color: var(--tblr-secondary);
    font-variant-numeric: tabular-nums;
}

.outline-step.active .outline-num {
    color: inherit;
}

.outline-icon {
    flex: none;
    width: 20px;
    height: 20px;
    border-radius: var(--tblr-border-radius-sm);
}

.outline-foot {
    padding: .5rem 1rem;
    font-size: .75rem;
    border-top: var(--tblr-border-width) solid var(--tblr-border-color);
}

.outline-foot kbd {
    padding: .0625rem .3125rem;
    font-family: inherit;
    font-size: .6875rem;
    color: var(--tblr-body-color);
    background: var(--tblr-bg-surface-secondary);
    border: var(--tblr-border-width) solid var(--tblr-border-color);
    border-radius: var(--tblr-border-radius-sm);
}

/* Briefly mark where a jump landed */
.outline-flash {
    animation: outline-flash 1.6s ease-out;
}

@keyframes outline-flash {
    0%, 35% { box-shadow: 0 0 0 2px var(--tblr-primary); }
    100% { box-shadow: 0 0 0 2px transparent; }
}

@media (max-width: 575.98px) {
    /* The panel spans the screen width; the pill stays at the right */
    .outline {
        left: 1rem;
        align-items: stretch;
    }

    .outline-toggle {
        align-self: flex-end;
    }

    .outline-panel {
        width: auto;
        max-height: calc(100vh - 8rem);
    }

    /* On a phone the pill keeps to the step counter */
    .outline-toggle-label {
        max-width: 12rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .outline-panel,
    .outline-flash {
        animation: none;
    }

    .outline-progress-bar {
        transition: none;
    }
}

/* ---------- Cooking instructions: levels and done marks ---------- */

.recipe-step-title {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.recipe-step-text {
    flex: 1;
    min-width: 0;
}

.step-done {
    display: inline-flex;
    flex: none;
    align-items: center;
    gap: .5rem;
    margin: 0;
    font-size: .8125rem;
    font-weight: 500;
    color: var(--tblr-secondary);
    cursor: pointer;
    user-select: none;
}

.step-done .form-check-input {
    margin: 0;
    cursor: pointer;
}

.recipe-step.is-done .recipe-step-text {
    color: var(--tblr-secondary);
}

.recipe-step.is-done .step-done {
    color: var(--tblr-success);
}

.recipe-step.is-done .table-responsive {
    opacity: .45;
}

/* A heading before each run of steps on the same level */
.recipe-level {
    display: flex;
    align-items: center;
    gap: .625rem;
    padding: .625rem 1rem;
    font-size: .8125rem;
    border-top: var(--tblr-border-width) solid var(--tblr-border-color);
    border-bottom: var(--tblr-border-width) solid var(--tblr-border-color);
    background: rgba(var(--tblr-primary-rgb), .08);
    scroll-margin-top: 5rem;
}

.recipe-level:first-of-type {
    border-top: 0;
}

.recipe-level .badge {
    font-size: .75rem;
}

.recipe-level-count {
    font-variant-numeric: tabular-nums;
}

.recipe-level.is-complete .recipe-level-count {
    color: var(--tblr-success) !important;
}

/* Flyout: checkbox + step, and a heading per level */
.outline-done-bar {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .5rem 1rem;
    font-size: .8125rem;
    border-bottom: var(--tblr-border-width) solid var(--tblr-border-color);
}

.outline-done-bar[hidden] {
    display: none;
}

.outline-done-count {
    flex: 1;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.outline-action {
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    padding: .125rem .5rem;
    font-size: .75rem;
    font-weight: 600;
    color: var(--tblr-primary);
    background: none;
    border: 0;
    border-radius: var(--tblr-border-radius);
}

.outline-action:hover:not(:disabled) {
    background: rgba(var(--tblr-primary-rgb), .12);
}

.outline-action:disabled {
    opacity: .4;
}

.outline-action[hidden] {
    display: none;
}

.outline-row {
    display: flex;
    align-items: center;
    gap: .25rem;
}

.outline-row > .outline-link {
    flex: 1;
    min-width: 0;
    width: auto;
}

.outline-done {
    flex: none;
    margin: 0 0 0 .375rem;
    cursor: pointer;
}

.outline-row.is-done .outline-name,
.outline-row.is-done .outline-qty {
    color: var(--tblr-secondary);
    text-decoration: line-through;
    opacity: .7;
}

.outline-group {
    margin-top: .375rem;
}

.outline-level {
    padding-block: .25rem;
    font-size: .6875rem;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--tblr-secondary);
}

.outline-level.is-complete,
.outline-level.is-complete .outline-count {
    color: var(--tblr-success);
}

/* Rig slots: the hint under a chosen rig, and the notes below the slots (an older link's flat rig
   setting, and the bonuses the fitted rigs gave). */
.rig-slot-hint:empty {
    display: none;
}

.rig-note {
    display: flex;
    align-items: flex-start;
    gap: .75rem;
    padding: .625rem .875rem;
    border: 1px solid var(--tblr-border-color);
    border-radius: var(--tblr-border-radius);
    background: var(--tblr-bg-surface-secondary);
    font-size: .875rem;
}

.rig-note > .ti {
    font-size: 1.25rem;
    line-height: 1.25rem;
    color: var(--tblr-primary);
}

.rig-note-body {
    flex: 1 1 auto;
    min-width: 0;
}

.rig-note li + li {
    margin-top: .125rem;
}

/* The previous result while a new one is being calculated (evecookbook.js). */
#results.is-stale {
    opacity: .45;
    pointer-events: none;
    transition: opacity .15s;
}
