/*
 * The shared look of all webshop themes, see "Styles" in the README of de.commodis.ui.webshop.
 * Classes of the webshop start with "commodis-"; select them instead of Tailwind or Bootstrap utilities.
 */

/*********************
 * BASE
 *
 * The rules of the former application.css (Bootstrap 3 and its admin theme) that the webshop still uses: the base styles
 * of elements, also for the HTML stored in the database, and the layout of the secured pages. Where webshop.css has a
 * rule with the same selector, their declarations are merged into it; the others stand here first, where application.css
 * was loaded, so that the rules below and the themes override them as before.
 ********************/
@media print {
    *,
    *::before,
    *::after {
        background: transparent !important;
        color: #000000 !important;
        box-shadow: none !important;
        text-shadow: none !important;
    }

    a,
    a:visited {
        text-decoration: underline;
    }

    a[href]::after {
        content: " (" attr(href) ")";
    }

    abbr[title]::after {
        content: " (" attr(title) ")";
    }

    a[href ^= "#"]::after,
    a[href ^= "javascript:"]::after {
        content: "";
    }

    pre,
    blockquote {
        border: 1px solid #999999;
        break-inside: avoid;
    }

    thead {
        display: table-header-group;
    }

    tr,
    img {
        break-inside: avoid;
    }

    img {
        max-width: 100% !important;
    }

    p,
    h2,
    h3 {
        orphans: 3;
        widows: 3;
    }

    h2,
    h3 {
        break-after: avoid;
    }

    select {
        background: #ffffff !important;
    }
}

* {
    box-sizing: border-box;
}

*::before,
*::after {
    box-sizing: border-box;
}

figure {
    margin: 0;
}

img {
    vertical-align: middle;
}

h1 small,
h2 small,
h3 small {
    font-size: 65%;
}

h4 small,
h5 small,
h6 small {
    font-size: 75%;
}

p {
    margin: 0 0 9px;
}

small {
    font-size: 92%;
}

mark {
    background-color: rgb(229 190 86 / 28%);
    padding: 0.2em;
}

ul ul,
ul ol,
ol ul,
ol ol {
    margin-bottom: 0;
}

dl {
    margin-top: 0;
    margin-bottom: 18px;
}

dt,
dd {
    line-height: calc(10 / 7);
}

dt {
    font-weight: bold;
}

dd {
    margin-left: 0;
}

abbr[title],
abbr[data-original-title] {
    cursor: help;
    border-bottom: 1px dotted #999999;
}

blockquote {
    padding: 9px 18px;
    margin: 0 0 18px;
    font-size: 16.25px;
    border-left: 5px solid rgb(51 51 51 / 40%);
}

blockquote p:last-child,
blockquote ul:last-child,
blockquote ol:last-child {
    margin-bottom: 0;
}

blockquote footer,
blockquote small {
    display: block;
    font-size: 80%;
    line-height: calc(10 / 7);
    color: #999999;
}

blockquote footer::before,
blockquote small::before {
    content: "\2014 \00A0";
}

address {
    margin-bottom: 18px;
    font-style: normal;
    line-height: calc(10 / 7);
}

code,
kbd,
pre,
samp {
    font-family: Menlo, Monaco, Consolas, "Courier New", monospace;
}

code {
    padding: 2px 4px;
    font-size: 90%;
    color: #c7254e;
    background-color: #f9f2f4;
}

kbd {
    padding: 2px 4px;
    font-size: 90%;
    color: white;
    background-color: #333333;
    border-radius: 3px;
    box-shadow: inset 0 -1px 0 rgb(0 0 0 / 25%);
}

kbd kbd {
    padding: 0;
    font-size: 100%;
    font-weight: bold;
    box-shadow: none;
}

pre {
    display: block;
    padding: 8.5px;
    margin: 0 0 9px;
    font-size: 12px;
    line-height: calc(10 / 7);
    word-break: break-all;
    overflow-wrap: break-word;
    color: #f8f8f8;
    background-color: rgb(51 51 51 / 25%);
    border: 1px solid rgb(51 51 51 / 40%);
}

pre code {
    padding: 0;
    font-size: inherit;
    color: inherit;
    white-space: pre-wrap;
    background-color: transparent;
    border-radius: 0;
}

table {
    background-color: transparent;
}

caption {
    padding-top: 8px;
    padding-bottom: 8px;
    color: #d2d2d2;
    text-align: left;
}

th {
    text-align: left;
}

table col[class *= "bs-col-"] {
    position: static;
    float: none;
    display: table-column;
}

table td[class *= "bs-col-"],
table th[class *= "bs-col-"] {
    position: static;
    float: none;
    display: table-cell;
}

label {
    display: inline-block;
    max-width: 100%;
    margin-bottom: 5px;
}

input[type = "radio"],
input[type = "checkbox"] {
    margin: 4px 0 0;
    line-height: normal;
}

input[type = "file"] {
    display: block;
}

input[type = "range"] {
    display: block;
    width: 100%;
}

select[multiple],
select[size] {
    height: auto;
}

input[type = "file"]:focus,
input[type = "radio"]:focus,
input[type = "checkbox"]:focus {
    outline-offset: -2px;
}

output {
    display: block;
    padding-top: 6px;
    font-size: 13px;
    line-height: calc(10 / 7);
    color: #555555;
}

input[type = "search"] {
    box-sizing: border-box;
    appearance: none;
}

input[type = "date"],
input[type = "time"],
input[type = "datetime-local"],
input[type = "month"] {
    line-height: 30px;
}

input[type = "radio"][disabled],
fieldset[disabled] input[type = "radio"],
input[type = "checkbox"][disabled],
fieldset[disabled] input[type = "checkbox"] {
    cursor: not-allowed;
}

a:focus {
    outline: none;
}

hr {
    margin-top: 18px;
    margin-bottom: 18px;
    border: 0;
    border-top: 1px solid #eeeeee;
}

blockquote p {
    font-size: inherit;
    margin-bottom: 9px;
}

h5 {
    font-size: 13px;
}

h1 small {
    font-size: 22.75px;
}

h2 small {
    font-size: 16.25px;
}

h3 small {
    font-size: 13px;
}

h4 small {
    font-size: 13px;
}

code,
pre {
    border-radius: 3px;
}

select:focus,
input[type = "file"]:focus,
input[type = "radio"]:focus,
input[type = "checkbox"]:focus {
    outline: none;
}

svg {
    -webkit-touch-callout: none;
    user-select: none;
    display: block;
    width: 100%;
    height: 100%;
}

button::-moz-focus-inner {
    padding: 0;
    border: 0;
}

svg text {
    font-weight: 300;
    font-size: 12px;
    fill: #f8f8f8;
}

html {
    -webkit-tap-highlight-color: transparent;

    /* the page is at least as high as the window */
    min-height: 100%;
    font-size: 16px;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: inherit;
    color: inherit;
    font-weight: 300;
    line-height: 1.2;
}

h1 small,
h2 small,
h3 small,
h4 small,
h5 small,
h6 small {
    line-height: 1;
    color: #d2d2d2;
    font-weight: 300;
}

ul ul,
ol ul {
    list-style: none;
}

ul,
ol {
    margin: 0;
    list-style: none;
    padding: 0;
}

iframe {
    box-sizing: border-box;
}

fieldset {
    padding: 0;
    margin: 0;
    border: 0;
    width: 100%;
    min-width: 0;
}

form {
    margin-bottom: 0;
}

@media (height >= 940px) {
    .logo {
        position: fixed;
    }
}

.sidebar {
    position: absolute;
    padding: 10px 0;
    color: white;
    margin: 80px 0 0 25px;
}

@media (height >= 940px) {
    .sidebar {
        position: fixed;
    }
}

.side-nav {
    margin: 0;
}

.side-nav li {
    list-style: none;
}

.side-nav li i[class *= "fa"] {
    width: 16px;
    margin-right: 8px;
    float: left;
    line-height: 20px;
    font-size: 14px;
    opacity: 0.4;
    text-align: right;
}

.widget-tabs {
    background: none;
    box-shadow: none;
    padding: 0;
}

.widget-tabs .body {
    background: rgb(51 51 51 / 40%);
    margin-top: 0;
    padding: 12px 17px;
    border-radius: 0 0 3px 3px;
}

.tab-header {
    margin-top: 0;
    margin-bottom: 1em;
    font-size: 14px;
    color: white;
}

@media (width < 768px) {
    body {
        padding-left: 20px;
        padding-right: 20px;
    }

    .sidebar {
        display: block;
        position: absolute;
        top: 0;
        left: 0;
        margin: 90px 5%;
        width: 90%;
        padding: 0;
    }

    .logo {
        display: block;
        left: 1.6%;
        right: auto;
        top: 4px;
    }
}

@media (width < 480px) {
    .sidebar {
        margin: 90px 2.5641%;
        width: 94.8718%;
    }

    body {
        padding-left: 0;
        padding-right: 0;
    }
}

@media print {
    hr {
        border-bottom-color: #999999;
    }

    blockquote {
        border-top: none;
        border-right: none;
        border-bottom: none;
    }

    .sidebar {
        display: none;
    }

    .wrap {
        margin: 0;
    }

    .logo {
        position: static;
        width: auto;
    }
}

/*********************
 * GLOBAL
 ********************/
h1,
h2,
h3 {
    margin-top: 18px;
    margin-bottom: 18px;
}

h4,
h5,
h6 {
    margin-top: 9px;
    margin-bottom: 9px;
    font-weight: var(--commodis-semibold-font-weight);
}

/* bold as with normalize.css, Tailwind Preflight would make strong bolder than a semibold or bold heading (900) */
:is(h1, h2, h3, h4, h5, h6, .page-title) strong {
    font-weight: var(--commodis-bold-font-weight);
}

a {
    text-decoration: none;
    transition: color 0.2s;
    color: var(--link-color);
}

/* a gap between the edge of the popup and the background of a hovered link, Bootstrap would remove the padding of commodis-menu */
.commodis-profile-menu ul {
    padding: 0.25rem;
}

/* the links of the profile menu in the header are menu entries, Bootstrap would underline them on hover and focus */
.commodis-profile-menu a,
.commodis-profile-menu a:hover,
.commodis-profile-menu a:focus {
    text-decoration: none;
}

dl dt,
dl dd {
    display: inline-block;
    width: 49%;
    min-width: 200px;
    padding: 4px 0;
}

ol {
    list-style-type: decimal;
    padding-left: 40px;
    padding-right: 40px;
    color: #666666;
}

ol li {
    padding: 4px 0;
}

ul.commodis-asterisk-text {
    padding-left: 40px;
    padding-right: 40px;
    color: #666666;
}

/* Helper */
.mt-20 {
    margin-top: 20px;
}

.mt-42 {
    margin-top: 42px;
}

.mb-25 {
    margin-bottom: 25px;
}

.mb-50 {
    margin-bottom: 50px;
}

/*
 * HTML from the database (offer texts, marketing, introductions, help) was written for normalize.css.
 * Inside it, images and iframes keep the browser defaults and HTML attributes such as height="16",
 * and strong stays bold instead of bolder than its parent.
 * revert-layer drops Tailwind Preflight for these declarations, as they sit in the same layer base.
 */
@layer base {
    .commodis-rich-text :is(img, svg, iframe, embed, object) {
        display: revert-layer;
        vertical-align: revert-layer;
    }

    .commodis-rich-text img {
        max-width: revert-layer;
        height: revert-layer;
    }

    .commodis-rich-text iframe {
        border: revert-layer;
    }

    .commodis-rich-text :is(b, strong) {
        font-weight: var(--commodis-bold-font-weight);
    }
}

/*********************
 * THEME
 ********************/
.widget header small {
    text-transform: none;
}

.commodis-page-header .commodis-nav > li > a {
    width: auto;
    margin: 0 15px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.widget .scrollable {
    overflow-y: auto;
    scrollbar-width: thin;
}

.feed-item .icon {
    width: 33px;
    height: 33px;
    line-height: 32px;
    background: rgb(51 51 51 / 10%);
}

/*********************
 * Formulare
 ********************/

/* Validation */
.commodis-validation-errors-list li {
    color: var(--validation-error-color);
    padding: 0.5rem;
    opacity: 1;
}

/*********************
 * Footer
 ********************/
body > footer {
    color: rgb(51 51 51 / 50%);
    font-weight: var(--commodis-normal-font-weight);
    position: relative;
    bottom: 0;
    left: 0;
    width: 100%;
    pointer-events: none;
}

body > footer div {
    padding: 10px 20px;
}

body > footer a {
    color: inherit;
    pointer-events: auto;
}

/* use the same color to avoid unreadabilities on hovering */
body > footer a:hover {
    color: inherit;
    text-decoration: underline;
}

/*********************
 * Navigation
 ********************/
#sidebar .side-nav > li > a {
    display: flex;
    align-items: center;
}

#sidebar .side-nav .fa-solid {
    margin-right: 5px;
}

#sidebar .side-nav > li span {
    display: block;
}

@media (width < 768px) {
    /* stylelint-disable-next-line no-duplicate-selectors -- of webshop.css, it has to stay behind the sidebar rule in between, the first one comes from the former application.css */
    .sidebar {
        margin-top: 90px;
    }
}

/*********************
 * Tooltips
 ********************/
.commodis-has-popover:hover {
    cursor: help;
}

/*********************
 * HACKS
 ********************/

/* fix: querscrollbar bei kleiner 480px */
@media (width < 480px) {
    .content {
        padding: 0 15px;
    }
}

/*********************
 * Logo and page backgrounds
 *
 * The themes set the logo as background-image of .logo, .commodis-single-logo-container (the logo in the header and on
 * the login pages), the rules here place it.
 *
 * The backgrounds of the pages:
 * - .commodis-public-page: the public pages (login, registration, password reset, errors, ...)
 * - .commodis-secured-page: the pages behind the login with header and sidebar (the class comes from the secure
 *   template)
 * Both classes are only on body.
 * A theme sets their colors as the custom properties --commodis-public-background-color and
 * --commodis-secured-background-color in its :root (required, the defaults in the :root of the default theme below are
 * the commodis blue). An image is optional: the theme sets the background-image of these two selectors, and the rules
 * here place it. The images are rules and not custom properties, because Chrome resolves a relative url() in a custom
 * property against the stylesheet that uses it, i.e. this one, and not against the theme that declares it (GL#21669).
 * The color shows while the image loads and wherever the image is transparent. The themes are loaded after this file,
 * so their image wins with the same selector.
 ********************/
.logo,
.commodis-single-logo-container {
    background-image: url("/de.commodis.ui.webshop/jakarta.faces.resource/logo.svg.xhtml?ln=webshop&v=0_2_0");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}

.commodis-single-logo-container {
    margin: 0 auto;
    height: 65px;
    width: 100%;
    position: relative;
    z-index: 1;
}

/*
 * the logo of the theme as the head of the status card (message-card.xhtml), small and on the left like a letterhead,
 * as on the registration pages (registration-status.css); the themes give the logo container its own height, width
 * and margin for the login page
 */
.commodis-card-logo .commodis-single-logo-container {
    width: 100%;
    max-width: 240px;
    height: 44px;
    margin: 0;
    background-position: left center;
}

@media (width < 768px) {
    .commodis-card-logo .commodis-single-logo-container {
        height: 36px;
    }
}

.logo {
    box-sizing: content-box;
    position: fixed;
    top: 17px;
    left: 20px;
    z-index: 3;
    height: 100px;
    width: 190px;
}

@media (width < 768px) {
    /* stylelint-disable-next-line no-duplicate-selectors -- of webshop.css, it has to stay behind the logo rule in between, the first one comes from the former application.css */
    .logo {
        height: 25px;
        background-position: center left;
        width: 150px;
        padding-right: 5px;
        margin-top: 4px;
    }
}

.commodis-public-page {
    background-color: var(--commodis-public-background-color);
}

.commodis-secured-page {
    background-color: var(--commodis-secured-background-color);
}

.commodis-public-page,
.commodis-secured-page {
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    background-attachment: fixed;
}

/*********************
 * Default theme
 ********************/

/* defaults of the colors a theme sets in its own :root, white text on the commodis blue has a contrast of 10:1 */
:root {
    --commodis-public-background-color: #024089;
    --commodis-secured-background-color: #024089;
    --button-primary-background: #024089;
    --button-primary-color: #ffffff;
    --button-primary-hover: #012f66;
    --button-primary-focus: #012f66;
    --button-secondary-background: #ffffff;
    --button-secondary-color: #024089;
    --button-secondary-border: var(--button-secondary-color);
    --button-secondary-hover: #e8eef6;
    --button-secondary-hover-border: var(--button-secondary-color);
    --button-secondary-focus: var(--button-secondary-hover);
    --button-secondary-focus-border: var(--button-secondary-color);
    --button-inverse-color: var(--button-primary-color);
    --button-inverse-hover: var(--button-primary-hover);
    --button-inverse-focus: var(--button-primary-focus);
    --text-color: var(--commodis-base-content-color);
    --body-color: var(--text-color);
    --muted-text-color: #757575;
    --background-text-color: #ffffff;
    --page-subtitle-color: rgb(255 255 255 / 75%);
    --link-color: var(--button-primary-background);
    --link-hover-color: var(--link-color);
    --footer-background: var(--commodis-neutral-color);
    --footer-color: var(--commodis-neutral-content-color);
    --profile-icon-background: var(--commodis-neutral-color);
    --profile-icon-color: var(--commodis-neutral-content-color);
    --validation-error-color: var(--commodis-error-color);
    --sidebar-hover-background-color: rgb(17 75 139 / 20%);
    --sidebar-active-background-color: transparent;
    --sidebar-active-border-color: transparent;
    --sidebar-border-width: 0;
    --login-button-color: var(--commodis-card-primary-btn-color);
    --login-button-content-color: var(--commodis-card-primary-btn-content-color);
    --search-button-color: var(--commodis-primary-color);
    --search-button-content-color: var(--commodis-primary-content-color);
}

body {
    background-color: rgb(74 121 147 / 89%);
    font-family: var(--commodis-font-family);
    font-size: 14px;
    font-weight: var(--commodis-normal-font-weight);
    line-height: 1.5em;
    padding: 0;
    color: var(--body-color);
}

.commodis-link-btn,
.commodis-default-btn {
    color: var(--button-secondary-color);
    background-color: var(--button-secondary-background);
    border-color: var(--button-secondary-border);
}

.commodis-link-btn[disabled] {
    color: #c8c8c8;
}

.commodis-link-btn:hover,
.commodis-default-btn:hover {
    color: var(--button-secondary-color);
    background-color: var(--button-secondary-hover);
    border-color: var(--button-secondary-hover-border);
}

.commodis-link-btn:focus,
.commodis-default-btn:focus {
    color: var(--button-secondary-color);
    background-color: var(--button-secondary-focus);
}

.commodis-link-btn:focus {
    border-color: var(--button-secondary-focus-border);
}

.commodis-action-btn {
    background-color: var(--button-primary-background);
    border-color: var(--button-primary-background);
}

.commodis-action-btn:hover,
.commodis-action-btn:active {
    color: var(--button-primary-color);
    background-color: var(--button-primary-hover);
    border-color: var(--button-primary-hover);
}

.commodis-action-btn:focus {
    color: var(--button-primary-color);
    background-color: var(--button-primary-focus);
    border-color: var(--button-primary-focus);
}

body:has(> .wrap) {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/*********************
 * Rules of all themes
 ********************/

html,
body {
    width: 100%;
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: rgb(0 0 0 / 0%);
}

/*
 * the search buttons next to the search fields of a list (bookings, taxations, offers, vouchers) lie on the background
 * of the page; a theme whose page has the primary color gives them another one
 */
.commodis-search-btn {
    --commodis-btn-color: var(--search-button-color);
    --commodis-btn-fg: var(--search-button-content-color);
}

/*
 * the login button has the shape of the button component (commodis-btn): sentence case, semibold, radius of a field;
 * its color is that of the primary buttons in a card, unless the theme sets another one
 */
#login-button {
    --commodis-btn-color: var(--login-button-color);
    --commodis-btn-fg: var(--login-button-content-color);

    align-items: center;
    border-radius: var(--commodis-field-radius);
    display: inline-flex;
    gap: 0.375rem;
    font-weight: var(--commodis-semibold-font-weight);
    min-width: 88px;
    flex: 0 0 auto;
    font-size: 14px;
    justify-content: center;
    margin: 0;
    outline: 0;
    text-decoration: none;
    transition: 0.3s cubic-bezier(0.25, 0.8, 0.5, 1), color 1ms;
    user-select: none;
    vertical-align: middle;
    position: relative;
}

input,
button,
select,
textarea {
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
    min-height: 40px;
}

legend {
    display: block;
    width: 100%;
    padding: 0;
    margin-bottom: 18px;
    font-size: 19.5px;
    line-height: inherit;
    color: white;
    border: 0;
    border-bottom: 1px solid #e5e5e5;
    padding-bottom: 10px;
}

label,
input,
button,
select,
textarea {
    font-weight: var(--commodis-normal-font-weight);
}

h1 {
    font-size: 1.75rem;
}

h2 {
    font-size: 1.5rem;
}

h3 {
    font-size: 1.375rem;
}

h4 {
    font-size: 1.125rem;
}

h5,
.tab-header,
.widget > header h4 {
    font-size: 1rem;
}

h6 {
    font-size: 0.875rem;
}

.page-title {
    color: white;
    font-weight: 300;
    margin: 11px 0 18px;
    margin-top: 11px;
    line-height: 1.2;
    font-size: 1.5rem;
}

@media (width < 768px) {
    .page-title {
        margin-top: 6px;
    }
}

/*
 * The back link of a detail page (commodis-back-link) stands in the slot "navigation" of the secure template, i.e. in
 * the page title. It stands above the title as a plain link in the color of the title, see "Page header" in the README.
 */
#page-title:has(> .commodis-back-link) {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
}

#page-title > .commodis-back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 2.75rem;
    color: inherit;
    font-size: 0.875rem;
    font-weight: var(--commodis-semibold-font-weight);
    line-height: 1.5;
    text-decoration: none;
}

#page-title > .commodis-back-link:hover {
    text-decoration: underline;
    text-underline-offset: 4px;
}

#page-title > .commodis-back-link:focus-visible {
    border-radius: 2px;
    outline: 2px solid currentcolor;
    outline-offset: 4px;
}

/*
 * The tabs of the dashboard stand on the background of the page, which a theme may darken or cover with an image. The
 * themes color them like the title of the page ("#offers-section .commodis-tab"), the selected tab is underlined in
 * that color and the panels have no line of their own.
 */
#offers-section .commodis-tab:checked {
    border-bottom-color: currentcolor;
}

#offers-section .commodis-tab-content {
    border-top: none;
}

#page-title:has(> .commodis-back-link) > small:empty {
    display: none;
}

.side-nav li.active > a {
    font-weight: var(--commodis-medium-font-weight);
    color: var(--sidebar-active-color, #024089);
    background: var(--sidebar-active-background-color);
    border-left-color: var(--sidebar-active-border-color);
}

.widget .body header {
    padding: 0;
}

tbody tr:last-child {
    border-bottom: 1px solid rgb(0 0 0 / 12%);
}

form tbody tr:last-child {
    border-bottom: none;
}

table tbody tr {
    transition: background 0.3s cubic-bezier(0.25, 0.8, 0.5, 1);
    will-change: background;
}

tfoot {
    background: transparent;
    border-top: 1px solid var(--commodis-base-200-color);
}

table tbody td:first-child,
table tbody td:not(:first-child),
table tbody th:first-child,
table tbody th:not(:first-child),
table thead td:first-child,
table thead td:not(:first-child),
table thead th:first-child,
table thead th:not(:first-child) {
    padding: 0 24px;
}

/*
 * grows with its content instead of being positioned absolute, so the background covers the whole page when scrolling
 * (GL#21548); a flex column at every width keeps the top margin of the card from collapsing through the body, which
 * made the page taller than the window and showed a stripe of the background color below the fixed background image
 * on phones (GL#21931)
 */
body.commodis-registration-page {
    display: flex;
    flex-flow: column;
    min-height: 100vh;
    font-size: 16px;
}

body.commodis-registration-page p {
    line-height: 1.8;
}

@media only screen and (resolution >= 2dppx) {
    .commodis-single-logo-container,
    .logo {
        display: block;
    }
}

button,
.commodis-to-offer-button,
.commodis-action-btn {
    /* each theme sets the text color of its buttons */
    color: var(--button-primary-color);

    /* the flat shadow of the button component instead of the raised one of Material Design */
    box-shadow: 0 1px 2px 0 rgb(0 0 0 / 10%);
}

/*
 * The button component (commodis-btn) is in a cascade layer, so every unlayered rule for links, buttons and inputs
 * would override it: the color and underline of links in the themes, or the shadow above. "revert-layer" falls back to
 * the layered styles, i.e. to the component and the Tailwind utilities. "html" wins against "a:hover" of the themes.
 */
html :is(a, button, input).commodis-btn {
    all: revert-layer;
}

/* the same for a card that links as a whole, e.g. the reward offers of the dashboard */
html a.commodis-card {
    all: revert-layer;
}

/*
 * The same for the content of a card of the design system (commodis-card) and of a modal (commodis-modal-box):
 * the components and Tailwind utilities style it alone, the rules of Bootstrap, webshop.css and the themes for elements
 * such as label, legend, p, h2 or input do not reach into it. A link in it therefore gets commodis-link. HTML from the
 * database (commodis-rich-text) keeps the unlayered rules it was written for.
 */
html :is(.commodis-card, .commodis-modal-box) :is(a, details, summary, label, legend, fieldset, input, textarea, select, button, h2, h3, h4, h5, p, ul, ol, li, dl, dt, dd, img, table, thead, tbody, tfoot, tr, th, td):not(.commodis-rich-text, .commodis-rich-text *) {
    all: revert-layer;
}

#login-button:hover {
    opacity: 0.9;
}

/*
 * The header of the secured pages: the navbar holds a list (commodis-nav) with the burger of the drawer and one with the profile menu.
 * flow-root holds the floating items of the lists, also for themes that use ::after of the header for a decoration.
 */
.commodis-page-header {
    display: flow-root;
    position: relative;
    margin: 0;
    border-radius: 0;
    box-shadow: 0 4px 15px 0 rgb(0 0 0 / 9%);
    padding: 0;
    background: var(--page-header, #f5f5f5);
    z-index: 1;
}

@media (width < 768px) {
    .commodis-page-header {
        width: 100%;
        position: fixed;
    }

    #sidebar {
        z-index: 999;
    }

    #sidebar .side-nav > li span {
        display: inline-block;
    }
}

/* the header has no decoration, the clearfix of its old bs-row hid the ::after of themes such as innovarix */
.commodis-secured-page .commodis-page-header::after {
    content: none;
}

/* the padding keeps the profile menu and its enlarged touch target off the edge of the window, so the page does not scroll sideways */
.commodis-page-header .commodis-navbar {
    display: flex;
    width: 100%;
    justify-content: end;
    padding-inline-end: 16px;
}

.commodis-navbar {
    position: relative;
    min-height: 40px;
}

/* no display of its own, so that the utility tw:tablet:hidden hides the list of the burger */
.commodis-nav::after {
    content: "";
    display: table;
    clear: both;
}

.commodis-nav > li {
    position: relative;
    float: left;
}

.commodis-nav > li > a {
    position: relative;
    padding: 0;
    font-size: 19.5px;
    text-align: center;
    line-height: 36px;
    outline: 0;
    transition: background-color 0.2s;
}

@media print {
    .commodis-page-header {
        display: none;
    }
}

@media (width < 768px) {
    .sidebar .side-nav {
        margin: 0 0 30px;
    }
}

@media (width >= 768px) {
    .sidebar {
        width: 250px;
    }
}

@media (width >= 768px) and (width < 1200px) {
    .sidebar {
        width: 190px;
    }

    .logo {
        width: 150px;
    }
}

.side-nav li a {
    transition: background-color 0.2s;
    text-decoration: none;
    display: block;
    padding: 14px 20px;
    border-radius: 2px;
    color: var(--sidebar-color, #020303);

    /* a theme can mark the link of the current page with a border on the left, the others keep it transparent */
    border-left: var(--sidebar-border-width) solid transparent;
}

.wrap {
    display: flow-root;
    flex-grow: 1;
    margin-left: 250px;
}

.widget .body {
    margin-top: 0;
}

@media (width >= 768px) {
    table {
        width: 100% !important;
    }
}

body.commodis-login-page {
    position: absolute;
    inset: 0;
}

body.commodis-bikeleasing-page {
    min-height: 100vh;
}

/* the column of the registration and e-mail verification pages, centered with the widths of the former bs-container */
body.commodis-registration-page > .commodis-registration-container {
    flex-grow: 1;
    margin-inline: auto;
    padding-inline: 15px;
}

@media (width >= 768px) {
    body.commodis-registration-page > .commodis-registration-container {
        width: 750px;
    }
}

@media (width >= 1024px) {
    body.commodis-registration-page > .commodis-registration-container {
        width: 970px;
    }
}

@media (width >= 1200px) {
    body.commodis-registration-page > .commodis-registration-container {
        width: 1170px;
    }
}

input[type = "submit"] {
    align-items: center;
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 14px;
    font-weight: var(--commodis-semibold-font-weight);
    height: 2.5rem;
    justify-content: center;
    margin: 0;
    min-width: 88px;
    outline: 0;
    position: relative;
    text-decoration: none;
    transition: 0.3s cubic-bezier(0.25, 0.8, 0.5, 1), color 1ms;
    user-select: none;
    vertical-align: middle;
}

.commodis-validation-errors-list {
    margin-top: 0.5rem;
}

/*
 * The tiles of the dashboard introduction and of the marketing tab. Their markup is stored in the database
 * (Public.WebshopSettings), see "Class names" in the README:
 *
 * <div class="commodis-dashboard-introduction">
 *     <div class="commodis-dashboard-introduction-container">
 *         <div class="flex flex-row gap">
 *             <div class="commodis-dashboard-introduction-image-wrapper"><img class="image"/></div>
 *             <div class="commodis-dashboard-introduction-container-content">
 *                 <h4 class="title">...</h4>
 *                 <div class="description">...</div>
 *                 <div class="button"><a class="commodis-btn commodis-primary-btn">...</a></div>
 *             </div>
 *         </div>
 *     </div>
 * </div>
 *
 * A tile looks like a card (commodis-card) with an image like the reward offers of the
 * dashboard: on the left from the tablet on, above the text on smaller screens. Its title takes the primary color.
 */
.commodis-dashboard-introduction {
    display: flex;
    flex-flow: column;
    gap: 1rem;
}

.commodis-dashboard-introduction-container {
    overflow: hidden;
    border-radius: var(--commodis-box-radius);
    background-color: var(--commodis-card-color);
    box-shadow: var(--commodis-box-shadow);
    color: var(--commodis-card-content-color);
}

.commodis-dashboard-introduction-container > .flex {
    flex-flow: column;
    gap: 0;
}

.commodis-dashboard-introduction-image-wrapper {
    flex-shrink: 0;
    padding: 0.625rem;
}

/*
 * The texts of de.commodis.import name the image, the title and the text of a tile
 * "commodis-dashboard-introduction-image", "-title" and "-description" instead of "image", "title" and "description".
 */
.commodis-dashboard-introduction-container img:is(.image, .commodis-dashboard-introduction-image) {
    display: block;
    width: 100%;
    aspect-ratio: 8 / 5;
    border-radius: var(--commodis-field-radius);
    object-fit: cover;
}

.commodis-dashboard-introduction-container-content {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 0.5rem;
    min-width: 0;
    padding: 1.5rem;
    font-size: 0.875rem;
}

.commodis-dashboard-introduction-container :is(.title, .commodis-dashboard-introduction-title) {
    margin: 0;
    color: var(--commodis-primary-color);
    font-size: 1.125rem;
    font-weight: var(--commodis-semibold-font-weight);
}

/* the text and lists of a tile take the color of the tile instead of the grey of ".description" and "ol" */
.commodis-dashboard-introduction-container :is(.description, ol, ul) {
    color: inherit;
}

.commodis-dashboard-introduction-container .button {
    margin-top: 0.5rem;
}

.commodis-dashboard-introduction-container .info {
    font-size: 12px;
}

@media (width >= 768px) {
    .commodis-dashboard-introduction-container > .flex {
        flex-flow: row;
    }

    .commodis-dashboard-introduction-image-wrapper {
        width: 14rem;
    }
}

/* a note in small print, used by marketing pages stored in the database */
.commodis-subinfo-text {
    font-size: 0.8em;
    font-style: italic;
    line-height: 1.15em;
    color: var(--text-medium, var(--muted-text-color));
}

.flex {
    display: flex;
}

.gap {
    gap: 15px;
}

.flex-row {
    flex-flow: row;
}

.flex-column {
    flex-flow: column;
}

.ai-center {
    align-items: center;
}

.flex-1 {
    flex: 1;
}

.jc-between {
    justify-content: space-between;
}

@media (width >= 768px) and (width < 1024px) {
    .sm-flex-column {
        flex-flow: column;
    }

    .sm-flex-row {
        flex-flow: row;
    }
}

@media (width >= 1024px) and (width < 1200px) {
    .md-flex-column {
        flex-flow: column;
    }

    .md-flex-row {
        flex-flow: row;
    }
}

.commodis-bikeleasing-page .wrap {
    overflow: auto;
    overflow-x: hidden;
    height: 100%;
}

/*********************
 * Cards, panels, tables and tabs
 *
 * The look of the commodis theme, the other themes change it in their own rules.
 ********************/
.feed-item-body .time,
caption {
    color: #7a7a7a;
}

/* the widgets of the old pages look like the card component (commodis-card): rounded and lifted by a soft shadow */
.widget {
    padding: 0;
    border-radius: var(--commodis-box-radius);
    box-shadow: var(--commodis-box-shadow);
    background: var(--card-background-color, var(--commodis-base-100-color));
}

.widget header,
.widget .body {
    padding: 1rem 1.25rem;
}

.tab-header,
.widget,
.widget > header {
    color: var(--card-color, var(--commodis-base-content-color));
}

table tbody tr:nth-child(2n),
table thead tr {
    background-color: var(--table-background-color-even, var(--commodis-base-200-color));
}

form table tbody tr:nth-child(2n) {
    background-color: var(--commodis-base-100-color);
}

/* the burger and the links of the header take the text color of the header, which a theme with a dark header sets */
.commodis-page-header .commodis-nav > li > a,
.commodis-page-header .commodis-navbar .commodis-nav > li > a:hover,
body .commodis-page-header .commodis-nav > li > a:focus {
    color: var(--page-header-color, var(--commodis-base-content-color));
}

/* the profile icon in the header, a theme with a dark header gives it a light color */
.commodis-page-header .commodis-avatar {
    --commodis-avatar-bg: var(--profile-icon-background);

    color: var(--profile-icon-color);
}

@media (hover: hover) {
    .commodis-page-header .commodis-avatar:hover {
        --commodis-avatar-bg: color-mix(in oklab, var(--profile-icon-background), #ffffff 15%);
    }
}

/* stylelint-disable-next-line no-duplicate-selectors -- of webshop.css, it overrides the rules of the former application.css above for phones and high windows, the first one keeps what they do not set */
.sidebar {
    margin-left: 0;
    margin-top: 0;
    width: 100%;
    top: 56px;
    background: var(--sidebar-background-color, #ffffff);
    z-index: 0;
    font-weight: var(--commodis-normal-font-weight);
}

@media (768px <= width) {
    .sidebar {
        top: 0;
        padding-top: 130px;
        padding-bottom: 10px;
        height: 100%;
        z-index: 2;
        width: 250px;
        box-shadow: 0 0 10px 0 rgb(0 0 0 / 50%);
    }
}

@media (768px <= width < 1200px) {
    .sidebar {
        width: 190px;
    }
}

@media (768px <= width < 1200px) {
    .wrap {
        margin-left: 190px;
    }
}

.side-nav li a:hover,
.side-nav li a:focus {
    background: var(--sidebar-hover-background-color);
}

.content {
    transition: margin-top 0.35s ease, opacity 0.2s;
    max-width: none;
    width: auto;
    opacity: 1;
    padding: 25px 2.5641% 100px;
}

@media (width < 768px) {
    .content {
        padding: 85px 2.5641% 100px;
    }
}

/*********************
 * Shared look of the themes
 * These rules stand at the end: they win over the rules above the way the rules of a theme do.
 * A theme changes their colors with the custom properties of :root.
 ********************/
.commodis-default-btn:active {
    color: var(--button-inverse-color);
    background-color: var(--button-inverse-hover);
    border-color: var(--button-inverse-hover);
}

.commodis-default-btn:focus {
    border-color: var(--button-inverse-focus);
}

.commodis-link-btn:active,
.commodis-action-btn:active {
    box-shadow: 0 5px 5px -3px rgb(0 0 0 / 20%), 0 8px 10px 1px rgb(0 0 0 / 14%), 0 3px 14px 2px rgb(0 0 0 / 12%);
}

h1,
h2,
h3,
.page-title {
    font-weight: var(--commodis-semibold-font-weight);
}

.description {
    color: var(--muted-text-color);
}

a:hover,
a:focus {
    text-decoration: underline;
    color: var(--link-hover-color);
}

footer div {
    background: var(--footer-background);
    color: var(--footer-color);
}

legend small {
    font-size: 14px;
    color: var(--text-color);
}

h1,
h2,
h3,
h4,
h5,
h6,
.page-title,
legend {
    color: var(--text-color);
    opacity: 1;
}

.page-title small {
    color: var(--page-subtitle-color);
    font-size: 22.75px;
    font-weight: 300;
    line-height: 1;
}

.commodis-secured-page .page-title,
.commodis-imprint-page h1.page-title,
.commodis-help-page h1.page-title,
.commodis-account-page h1.page-title,
.commodis-feedback-page h1.page-title,
.commodis-dashboard-page h1.page-title,
.commodis-dashboard-page h4,
.commodis-dashboard-page h5,
.commodis-article-details-page h1.page-title,
.commodis-booking-list-page h1.page-title,
.commodis-booking-list-page h1.page-title small,
.commodis-article-details-page .commodis-asterisk-text,
#offers-section .commodis-tab,
#offers-section label,
#offers-section .tab-header {
    color: var(--background-text-color);
}

.secondary-color {
    color: #ffffff;
}
