@font-face {
    font-family: "Roboto Condensed";
    src: url("../fonts/RobotoCondensed-VariableFont_wght.ttf") format("truetype");
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Roboto Condensed";
    src: url("../fonts/RobotoCondensed-Italic-VariableFont_wght.ttf") format("truetype");
    font-weight: 100 900;
    font-style: italic;
    font-display: swap;
}

:root {
    --bs-font-sans-serif: "Roboto Condensed", system-ui, sans-serif;
    --bs-body-font-family: "Roboto Condensed", system-ui, sans-serif;
}

html,
body,
.navbar,
.btn {
    font-family: "Roboto Condensed", system-ui, sans-serif;
}

main > .container {
    padding: 70px 15px 20px;
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

.not-set {
    color: var(--bs-danger);
    font-style: italic;
}

/* add sorting icons to gridview sort links */
a.asc:after, a.desc:after {
    content: '';
    left: 3px;
    display: inline-block;
    width: 0;
    height: 0;
    border: solid 5px transparent;
    margin: 4px 4px 2px 4px;
    background: transparent;
}

a.asc:after {
    border-bottom: solid 7px var(--bs-body-color);
    border-top-width: 0;
}

a.desc:after {
    border-top: solid 7px var(--bs-body-color);
    border-bottom-width: 0;
}

.grid-view th {
    white-space: nowrap;
}

.hint-block {
    display: block;
    margin-top: 5px;
    color: var(--bs-secondary-color);
}

.error-summary {
    color: var(--bs-danger-text-emphasis);
    background: var(--bs-danger-bg-subtle);
    border-left: 3px solid var(--bs-danger-border-subtle);
    padding: 10px 20px;
    margin: 0 0 15px 0;
}

/* align navbar brand with nav links */
.navbar > .container,
.navbar > .container-fluid {
    align-items: center;
}

.navbar-brand {
    gap: 0.55rem;
    padding-top: 0.35rem;
    padding-bottom: 0.35rem;
    line-height: 1;
    white-space: normal;
}

.navbar-menu-toggle {
    padding: .2rem;
    border: 0;
    box-shadow: none;
}

.navbar-menu-toggle:focus {
    box-shadow: none;
}

.navbar-menu-bars {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 22px;
    height: 16px;
}

.navbar-menu-bars span {
    display: block;
    flex: 0 0 2px;
    width: 100%;
    height: 2px;
    min-height: 2px;
    max-height: 2px;
    background: #fff;
    border-radius: 0;
    box-sizing: border-box;
}

.navbar-menu-bars span:first-child {
    width: 76%;
    align-self: flex-start;
}

.navbar-menu-bars span:last-child {
    width: 76%;
    align-self: flex-end;
}

.navbar-brand .navbar-logo {
    display: block;
    width: auto;
    height: 40px;
    min-height: 40px;
    flex: 0 0 auto;
    object-fit: contain;
}

.navbar-tools {
    display: flex;
    align-items: center;
    gap: .15rem;
}

.navbar-cart,
.navbar-profile {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2rem;
    min-height: 2rem;
    padding: 0;
    border: 0;
    background: transparent;
    color: #fff;
    cursor: pointer;
}

.navbar-profile {
    margin-right: .15rem;
}

.navbar-profile.dropdown-toggle::after {
    display: none;
}

.navbar-profile-menu {
    --bs-dropdown-min-width: 10.5rem;
    --bs-dropdown-bg: #f4f1eb;
    --bs-dropdown-color: #1c1914;
    --bs-dropdown-link-color: #1c1914;
    --bs-dropdown-link-hover-color: #1c1914;
    --bs-dropdown-link-hover-bg: rgba(28, 25, 20, .08);
    --bs-dropdown-link-active-color: #f3efe8;
    --bs-dropdown-link-active-bg: #1e2124;
    --bs-dropdown-border-color: transparent;
    --bs-dropdown-padding-y: .4rem;
    margin-top: .4rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .18);
}

[data-bs-theme="dark"] .navbar-profile-menu {
    --bs-dropdown-bg: #1e2124;
    --bs-dropdown-color: #f3efe8;
    --bs-dropdown-link-color: #f3efe8;
    --bs-dropdown-link-hover-color: #f3efe8;
    --bs-dropdown-link-hover-bg: rgba(243, 239, 232, .08);
    --bs-dropdown-link-active-color: #1e2124;
    --bs-dropdown-link-active-bg: #f3efe8;
}

.navbar-cart__icon,
.navbar-profile__icon {
    display: block;
    width: 22px;
    height: 22px;
    filter: invert(1);
}

.navbar-cart__count {
    position: absolute;
    top: 0;
    right: 0;
    min-width: 1.05rem;
    height: 1.05rem;
    padding: 0 .25rem;
    border-radius: 999px;
    background: #c44b32;
    color: #fff;
    font-size: .65rem;
    font-weight: 700;
    line-height: 1.05rem;
    text-align: center;
}

#theme-toggle.theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.2rem 0.35rem;
    color: #fff;
    line-height: 1;
}

#theme-toggle.theme-toggle:hover,
#theme-toggle.theme-toggle:focus {
    color: #fff;
}

#theme-toggle .theme-toggle-icon {
    display: block;
    width: 22px;
    height: 22px;
    filter: invert(1);
}

.navbar-brand .navbar-brand-text {
    display: inline-block;
    font-size: 0.86rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    line-height: 1.1;
    text-transform: uppercase;
    white-space: normal;
}

/* align the logout "link" (button in form) of the navbar */
.nav li > form > button.logout {
    color: var(--bs-navbar-color);
}

@media (max-width: 767.98px) {
    .navbar > .container,
    .navbar > .container-fluid {
        flex-wrap: wrap;
        align-items: center;
    }

    .navbar-brand {
        margin-right: 0;
    }

    .navbar-tools {
        margin-left: auto;
        margin-right: .55rem;
        flex: 0 0 auto;
    }

    .navbar-menu-toggle {
        margin-left: 0;
        flex: 0 0 auto;
    }

    .navbar-collapse {
        flex: 1 0 100%;
        width: 100%;
        max-width: 100%;
    }

    .navbar-nav .nav-link.logout {
        display: block;
        text-align: left;
        width: 100%;
        padding: 10px 0;
    }
}

.navbar-nav .nav-link.logout:focus,
.navbar-nav .nav-link.logout:hover {
    color: var(--bs-navbar-hover-color);
}

/* footer logo: light logo by default (light bg-body-tertiary), dark logo for dark theme */
.footer-logo-dark { display: none; }

[data-bs-theme="dark"] .footer-logo-light { display: none; }
[data-bs-theme="dark"] .footer-logo-dark  { display: inline-block; }

/* login inputs */
.login-split-card .input-group {
    isolation: isolate;
    border: 0;
    border-radius: 8px;
    overflow: hidden;
    background: #2a2a2a;
    box-shadow: 0 3px 10px rgba(0, 0, 0, .4);
}

.login-split-card .input-group .input-group-text {
    background: #2a2a2a;
    border: 0;
    padding: .7rem 1rem .7rem 1.05rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-field-icon {
    display: block;
    width: 1.05rem;
    height: 1.05rem;
    filter: invert(1);
    opacity: .78;
}

.login-password-toggle {
    appearance: none;
    cursor: pointer;
}

.login-password-toggle:hover .login-field-icon,
.login-password-toggle:focus-visible .login-field-icon {
    opacity: 1;
}

.login-password-toggle:focus {
    outline: none;
}

.login-password-toggle:focus-visible {
    outline: 2px solid rgba(243, 239, 232, .35);
    outline-offset: -4px;
}

.login-password-toggle .login-password-icon-open {
    display: none;
    width: 1.35rem;
}

.login-password-toggle.is-revealed .login-password-icon-closed {
    display: none;
}

.login-password-toggle.is-revealed .login-password-icon-open {
    display: block;
}

.login-split-card .input-group .form-control {
    border: 0;
    background: #2a2a2a;
    color: #f3efe8;
    box-shadow: none;
    min-height: 3rem;
    padding-top: .7rem;
    padding-bottom: .7rem;
}

.login-password-input:not(.is-revealed) {
    -webkit-text-security: disc;
}

.login-password-input.is-revealed {
    -webkit-text-security: none;
}

.login-split-card .input-group .form-control::placeholder {
    color: rgba(243, 239, 232, .42);
}

.login-split-card .input-group .form-control:focus {
    border: 0;
    background: #2a2a2a;
    color: #f3efe8;
    box-shadow: none;
}

.login-split-card .input-group:focus-within {
    border: 0;
    box-shadow: 0 3px 10px rgba(0, 0, 0, .4);
}

.login-split-card .input-group .form-control:-webkit-autofill,
.login-split-card .input-group .form-control:-webkit-autofill:hover,
.login-split-card .input-group .form-control:-webkit-autofill:focus {
    -webkit-text-fill-color: #f3efe8;
    -webkit-box-shadow: 0 0 0 1000px #2a2a2a inset;
    caret-color: #f3efe8;
}

.login-split-card .invalid-feedback {
    color: #e2b4b0;
}

/* login split card */
.login-split-card {
    position: relative;
    isolation: isolate;
    border-radius: 1rem;
    box-shadow: 0 4px 24px rgba(0, 0, 0, .10);
    background-color: #1e2124;
    color: #f3efe8;
    width: 100%;
    max-width: 900px;
}

.login-split-card::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    background:
        radial-gradient(circle at 20% 80%, rgba(243, 239, 232, .08) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(201, 160, 106, .16) 0%, transparent 40%);
    pointer-events: none;
}

.login-split-card > .row {
    position: relative;
    z-index: 1;
}

.login-form-panel .h3,
.login-form-panel .form-label {
    color: #f3efe8;
}

.login-form-panel .text-body-secondary {
    color: rgba(243, 239, 232, .58) !important;
}

.login-split-card-wide {
    max-width: 960px;
}

.login-brand-title {
    font-size: 1.75rem;
    line-height: 1.3;
}

.login-brand-text {
    font-size: .9rem;
}

.login-brand-panel,
.login-form-panel {
    background: transparent;
    position: relative;
    z-index: 1;
}

.login-brand-panel {
    min-height: 480px;
}

.login-brand-logo {
    position: relative;
    z-index: 1;
}

.login-btn {
    background: #2a2a2a;
    border: none;
    font-weight: 600;
    letter-spacing: .02em;
    color: #f3efe8;
    min-height: 3rem;
    padding-top: .7rem;
    padding-bottom: .7rem;
    box-shadow: 0 3px 10px rgba(0, 0, 0, .4);
    transition: opacity .2s, transform .1s;
}

.login-btn:hover {
    opacity: .9;
    transform: translateY(-1px);
}

.login-btn:active {
    transform: translateY(0);
}

/* dark mode login card */
[data-bs-theme="dark"] .login-split-card {
    background-color: #1e2124;
    box-shadow: 0 4px 24px rgba(0, 0, 0, .4);
}

[data-bs-theme="dark"] .login-mobile-logo {
    filter: none;
}

html[data-bs-theme="light"]:has(.site-login) body,
html[data-bs-theme="light"]:has(.site-login) main,
html[data-bs-theme="light"]:has(.site-login) main > .container {
    background: #f4f1eb;
}

/* centered page layout */
.site-login,
.site-error,
.main-fullwidth {
    flex: 1;
}

.site-error .site-error-content {
    width: 100%;
    max-width: 90%;
}

@media (min-width: 576px) {
    .site-error .site-error-content {
        max-width: 80%;
    }
}

@media (min-width: 768px) {
    .site-error .site-error-content {
        max-width: 60%;
    }
}

@media (min-width: 992px) {
    .site-error .site-error-content {
        max-width: 50%;
    }
}
