/*
 * Molderex site template
 * (C) 2026 Martin Koppel, GPL-2.0-or-later
 */

/* ---------- Fonts ---------- */

@font-face {
    font-family: "Inter";
    font-style: normal;
    font-display: swap;
    font-weight: 100 900;
    src: url("../fonts/inter-latin-ext-wght-normal.woff2") format("woff2");
    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: "Inter";
    font-style: normal;
    font-display: swap;
    font-weight: 100 900;
    src: url("../fonts/inter-latin-wght-normal.woff2") format("woff2");
    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;
}

/* ---------- Design tokens ---------- */

:root {
    --mx-primary: #1F2D3D;
    --mx-accent: #F28C28;

    --mx-primary-hover: color-mix(in srgb, var(--mx-primary) 85%, #fff);
    --mx-primary-soft: color-mix(in srgb, var(--mx-primary) 8%, #fff);
    --mx-nav-active: color-mix(in srgb, var(--mx-primary) 80%, #fff);
    --mx-nav-hover: color-mix(in srgb, var(--mx-primary) 90%, #fff);
    --mx-nav-text: color-mix(in srgb, #fff 78%, var(--mx-primary));
    --mx-nav-line: color-mix(in srgb, #fff 14%, var(--mx-primary));
    --mx-accent-hover: color-mix(in srgb, var(--mx-accent) 88%, #000);
    --mx-accent-soft: color-mix(in srgb, var(--mx-accent) 12%, #fff);
    --mx-accent-text: #8A4A0B;

    --mx-bg: #FFFFFF;
    --mx-surface: #FFFFFF;
    --mx-surface-2: #F6F7F9;
    --mx-border: #DFE3E8;
    --mx-border-strong: #C9CED4;
    --mx-text: #1F2D3D;
    --mx-muted: #6C757D;

    --mx-ok: #16855A;
    --mx-ok-soft: #E3F4EC;
    --mx-ok-text: #0F6343;
    --mx-info: #2F6FD6;
    --mx-info-soft: #E5EEFC;
    --mx-info-text: #1F4FA3;
    --mx-danger: #C7372F;
    --mx-danger-soft: #FBE7E6;
    --mx-danger-text: #9B2620;
    --mx-warn-soft: #FEF3E8;
    --mx-warn-text: #8A4A0B;

    --mx-radius: 4px;
    --mx-radius-sm: 4px;
    --mx-radius-xs: 3px;
    --mx-control-h: 40px;
    --mx-sidebar-w: 256px;
    --mx-gap: 24px;
    --mx-pad: 32px;
    --mx-shadow: 0 1px 2px rgba(16, 24, 32, .04);
    --mx-shadow-lg: 0 12px 32px rgba(16, 24, 32, .18);
    --mx-focus: 0 0 6px color-mix(in srgb, var(--mx-accent) 22%, transparent);
    --mx-focus-border: color-mix(in srgb, var(--mx-accent) 65%, #fff);
    --mx-focus-dark: 0 0 0 2px color-mix(in srgb, #fff 55%, transparent);
    --mx-font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

    /* Bootstrap names read by Joomla core layouts and by Soleree */
    --bs-primary: var(--mx-primary);
    --bs-secondary: var(--mx-muted);
    --bs-body-font-family: var(--mx-font);
    --bs-body-color: var(--mx-text);
    --bs-body-bg: var(--mx-bg);
    --bs-border-color: var(--mx-border);
    --bs-link-color: var(--mx-link, var(--mx-primary));
    --bs-link-hover-color: var(--mx-link-hover, var(--mx-primary));
}

/* ---------- Base ---------- */

[hidden] {
    display: none !important;
}

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

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;
    font-family: var(--mx-font);
    font-size: 15px;
    line-height: 1.5;
    color: var(--mx-text);
    background: var(--mx-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    margin: 0 0 .5em;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -.01em;
    color: var(--mx-text);
}

h1 { font-size: 28px; letter-spacing: -.02em; }
h2 { font-size: 20px; }
h3 { font-size: 17px; }
h4, h5, h6 { font-size: 15px; }

p { margin: 0 0 1em; }

a {
    color: var(--mx-link, var(--mx-primary));
    text-decoration: underline;
    text-decoration-color: color-mix(in srgb, currentColor 35%, transparent);
    text-underline-offset: 2px;
}

a:hover {
    color: var(--mx-link-hover, var(--mx-primary));
    text-decoration-color: currentColor;
}

img, svg {
    vertical-align: middle;
}

img {
    max-width: 100%;
    height: auto;
}

hr {
    border: 0;
    border-top: 1px solid var(--mx-border);
    margin: var(--mx-gap) 0;
}

:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px var(--mx-focus-border);
    border-radius: var(--mx-radius-xs);
}

.mx-skip {
    position: absolute;
    left: 8px;
    top: -60px;
    z-index: 1000;
    padding: 6px 12px;
    border-radius: var(--mx-radius-sm);
    background: var(--mx-surface);
    color: var(--mx-text);
    box-shadow: var(--mx-shadow-lg);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
}

/* Shown only when reached with the keyboard (Tab), not after a mouse or touch focus */
.mx-skip:focus-visible {
    top: 8px;
}

.mx-visually-hidden,
.visually-hidden,
.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* ---------- App shell ---------- */

.mx-shell {
    display: flex;
    min-height: 100vh;
    min-height: 100dvh;
}

.mx-sidebar {
    position: sticky;
    top: 0;
    flex: 0 0 var(--mx-sidebar-w);
    width: var(--mx-sidebar-w);
    height: 100vh;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 22px 14px 14px;
    background: var(--mx-primary);
    color: #fff;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: var(--mx-nav-line) transparent;
}

.mx-sidebar__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 0 8px;
}

.mx-sidebar__brand {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    border-radius: var(--mx-radius-xs);
}

.mx-sidebar__brand .mx-logo {
    height: 32px;
    width: auto;
    max-width: 190px;
}

.mx-sidebar__close {
    display: none;
}

.mx-logo--mark {
    display: none;
}

.mx-sidebar__collapse {
    flex: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: var(--mx-radius-sm);
    background: transparent;
    color: var(--mx-nav-text);
    cursor: pointer;
}

.mx-sidebar__collapse:hover {
    background: var(--mx-nav-hover);
    color: #fff;
}

.mx-sidebar__collapse svg {
    transition: transform .2s;
}

.mx-sidebar__nav {
    flex: 1 1 auto;
}

.mx-sidebar__extra {
    color: var(--mx-nav-text);
    font-size: 14px;
}

.mx-sidebar__extra a {
    color: #fff;
}

.mx-main {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.mx-content {
    flex: 1 1 auto;
    width: 100%;
    padding: 4px var(--mx-pad) 40px;
}

.mx-content > * + * {
    margin-top: var(--mx-gap);
}

.mx-content > #system-message-container:empty {
    display: none;
}

.mx-footer {
    padding: 16px var(--mx-pad) 24px;
    font-size: 13px;
    color: var(--mx-muted);
}

/* ---------- Top bar ---------- */

.mx-topbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    padding: 28px var(--mx-pad) 24px;
}

.mx-mobilebar {
    display: none;
}

.mx-topbar__title {
    flex: 1 1 320px;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.mx-page-title {
    margin: 0;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -.02em;
    overflow-wrap: anywhere;
}

.mx-page-date {
    margin: 0;
    font-size: 14px;
    color: var(--mx-muted);
}

.mx-topbar__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    margin-left: auto;
}

/* ---------- Sidebar menu ---------- */

.mx-nav,
.mx-nav__sub {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mx-nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.mx-nav__item {
    position: relative;
}

.mx-nav__link {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    min-height: 44px;
    padding: 0 12px;
    border: 0;
    border-radius: var(--mx-radius-sm);
    background: transparent;
    color: var(--mx-nav-text);
    font: inherit;
    font-size: var(--mx-menu-fs, 15px);
    font-weight: 500;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    transition: background-color .15s, color .15s;
}

.mx-nav__link:hover,
.mx-nav__link:focus-visible {
    background: var(--mx-nav-hover);
    color: #fff;
}

.mx-nav__link--static {
    cursor: default;
}

.mx-nav__link--static:hover {
    background: transparent;
    color: var(--mx-nav-text);
}

.mx-nav__item.is-current > .mx-nav__link {
    background: var(--mx-nav-active);
    color: #fff;
    font-weight: 600;
}

.mx-nav__item.is-current > .mx-nav__link .mx-icon {
    color: var(--mx-accent);
}

.mx-nav__link .mx-icon {
    flex: none;
    width: 20px;
    height: 20px;
    font-size: 18px;
    line-height: 20px;
    text-align: center;
}

.mx-nav__label {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mx-nav__item.has-children > .mx-nav__link:not(.mx-nav__toggle) {
    padding-right: 48px;
}

.mx-nav__expand {
    position: absolute;
    top: 0;
    right: 0;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: var(--mx-radius-sm);
    background: transparent;
    color: var(--mx-nav-text);
    cursor: pointer;
}

.mx-nav__expand:hover {
    color: #fff;
    background: var(--mx-nav-hover);
}

.mx-nav__chevron {
    flex: none;
    transition: transform .2s;
}

.mx-nav__toggle[aria-expanded="true"] .mx-nav__chevron {
    transform: rotate(180deg);
}

.mx-nav__sub {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin: 2px 0 6px 21px;
    padding-left: 10px;
    border-left: 1px solid var(--mx-nav-line);
}

.mx-nav__sub[hidden] {
    display: none;
}

.mx-nav__sub .mx-nav__link {
    min-height: 40px;
    font-size: var(--mx-menu-fs, 15px);
}

.mx-nav__divider {
    margin-top: 14px;
}

.mx-nav__heading {
    display: block;
    padding: 6px 12px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: color-mix(in srgb, #fff 55%, var(--mx-primary));
}

/* ---------- Signed-in user ---------- */

.mx-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 0 4px;
    border-top: 1px solid var(--mx-nav-line);
}

.mx-user__avatar {
    flex: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--mx-accent);
    color: var(--mx-primary);
    font-size: 14px;
    font-weight: 700;
}

.mx-user__name {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 14px;
    font-weight: 600;
}

.mx-user__logout {
    margin: 0;
}

.mx-user__logout-btn {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: var(--mx-radius-sm);
    background: transparent;
    color: var(--mx-nav-text);
    cursor: pointer;
}

.mx-user__logout-btn:hover {
    background: var(--mx-nav-hover);
    color: #fff;
}

/* ---------- Mobile: off-canvas sidebar ---------- */

.mx-backdrop {
    position: fixed;
    inset: 0;
    z-index: 90;
    background: rgba(15, 23, 32, .5);
    opacity: 0;
    transition: opacity .2s;
}

.mx-backdrop[hidden] {
    display: none;
}

:root.mx-narrow {
    --mx-pad: 15px;
    --mx-gap: 18px;
}

.mx-narrow .mx-sidebar {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 100;
    width: min(var(--mx-drawer-w, 300px), 100vw);
    height: auto;
    transform: translateX(100%);
    visibility: hidden;
    transition: transform .25s ease, visibility 0s linear .25s;
    box-shadow: var(--mx-shadow-lg);
}

.mx-narrow .mx--menu-open .mx-sidebar {
    transform: none;
    visibility: visible;
    transition: transform .25s ease;
}

.mx-narrow .mx--menu-open .mx-backdrop {
    opacity: 1;
}

.mx-narrow .mx--menu-open {
    overflow: hidden;
}

.mx-narrow .mx-sidebar__close {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: var(--mx-radius-sm);
    background: transparent;
    color: #fff;
    cursor: pointer;
    margin-right: 0;
}

.mx-narrow .mx-sidebar__close:hover {
    color: var(--mx-accent);
}

.mx-narrow .mx-sidebar__collapse {
    display: none;
}

.mx-narrow .mx-mobilebar {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 60px;
    padding: 8px var(--mx-pad);
    background: var(--mx-primary);
    color: #fff;
}

.mx-narrow .mx-mobilebar__menu {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    order: 2;
    margin-left: auto;
    margin-right: -10px;
    border: 0;
    border-radius: var(--mx-radius-sm);
    background: transparent;
    color: #fff;
    cursor: pointer;
}

.mx-narrow .mx-mobilebar__menu:hover {
    background: var(--mx-nav-hover);
}

.mx-narrow .mx-mobilebar :focus-visible {
    box-shadow: var(--mx-focus-dark);
}

.mx-narrow .mx-mobilebar__brand {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
}

.mx-narrow .mx-mobilebar__brand .mx-logo {
    height: 30px;
    width: auto;
    max-width: 200px;
}

.mx-narrow .mx-topbar {
    gap: 12px;
    padding: 20px var(--mx-pad) 0;
}

.mx-narrow .mx-topbar__actions {
    gap: 8px;
    margin-left: 0;
    justify-content: flex-start;
}

.mx-narrow .mx-topbar__title {
    flex: 1 1 100%;
}

.mx-narrow .mx-page-title {
    font-size: 22px;
}

.mx-narrow .mx-page-date {
    font-size: 13px;
}

.mx-narrow .mx-content {
    padding-top: 18px;
}

.mx-narrow .mx-mobilebar + .mx-content {
    padding-top: 20px;
}


@media (max-width: 599.98px) {
    body {
        font-size: 15px;
    }

    h1 { font-size: 22px; }
    h2 { font-size: 18px; }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        transition: none !important;
        animation: none !important;
    }
}

/* ---------- Cards and module chrome ---------- */

.mx-card,
.card {
    background: var(--mx-surface);
    border: 1px solid var(--mx-border);
    border-radius: var(--mx-radius);
    padding: 20px;
}

.mx-card__title,
.card-header {
    margin: 0 0 14px;
    font-size: 16px;
    font-weight: 700;
}

.card-header {
    padding: 0;
    background: none;
    border: 0;
}

.card-body {
    padding: 0;
}

/* ---------- Buttons ---------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: var(--mx-control-h);
    padding: 0 18px;
    border: 1px solid transparent;
    border-radius: var(--mx-radius-sm);
    background: transparent;
    color: var(--mx-text);
    font: inherit;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color .15s, border-color .15s, color .15s;
}

.btn:disabled,
.btn.disabled {
    opacity: .55;
    cursor: not-allowed;
}

.btn-primary {
    background: var(--mx-primary);
    border-color: var(--mx-primary);
    color: #fff;
}

.btn-primary:hover {
    background: var(--mx-primary-hover);
    border-color: var(--mx-primary-hover);
    color: #fff;
}

.btn-accent,
.btn-warning {
    background: var(--mx-accent);
    border-color: var(--mx-accent);
    color: var(--mx-primary);
}

.btn-accent:hover,
.btn-warning:hover {
    background: var(--mx-accent-hover);
    border-color: var(--mx-accent-hover);
    color: var(--mx-primary);
}

.btn-secondary,
.btn-light,
.btn-outline-secondary,
.btn-outline-primary {
    background: var(--mx-surface);
    border-color: var(--mx-border-strong);
    color: var(--mx-text);
}

.btn-secondary:hover,
.btn-light:hover,
.btn-outline-secondary:hover,
.btn-outline-primary:hover {
    background: var(--mx-surface-2);
    border-color: var(--mx-muted);
    color: var(--mx-text);
}

.btn-success {
    background: var(--mx-ok);
    border-color: var(--mx-ok);
    color: #fff;
}

.btn-danger {
    background: var(--mx-danger);
    border-color: var(--mx-danger);
    color: #fff;
}

.btn-success:hover,
.btn-danger:hover {
    filter: brightness(.92);
    color: #fff;
}

.btn-link {
    background: none;
    border-color: transparent;
    color: var(--mx-primary);
    text-decoration: underline;
}

.btn-sm {
    min-height: 36px;
    padding: 0 12px;
    font-size: 13px;
}

.btn-lg {
    min-height: 52px;
    padding: 0 24px;
    font-size: 16px;
}

/* ---------- Forms ---------- */

label,
.form-label,
.control-label label {
    display: inline-block;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 600;
    color: var(--mx-text);
}

.form-control,
.form-select,
.inputbox,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
input[type="number"],
input[type="tel"],
input[type="url"],
input[type="date"],
input[type="datetime-local"],
input[type="time"],
select,
textarea {
    display: block;
    width: 100%;
    min-height: var(--mx-control-h);
    padding: 10px 14px;
    border: 1px solid var(--mx-border-strong);
    border-radius: var(--mx-radius-sm);
    background-color: var(--mx-surface);
    color: var(--mx-text);
    font: inherit;
    font-size: 15px;
    line-height: 1.4;
    transition: border-color .15s, box-shadow .15s;
}

textarea {
    min-height: 110px;
    resize: vertical;
}

select,
.form-select {
    appearance: none;
    padding-right: 40px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%235F6B76' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
}

select[multiple] {
    padding-right: 14px;
    background-image: none;
}

.form-control:focus,
.form-select:focus,
input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--mx-focus-border);
    box-shadow: var(--mx-focus);
}

::placeholder {
    color: #8592A0;
    opacity: 1;
}

.form-control.invalid,
.form-control:invalid.is-invalid,
.invalid {
    border-color: var(--mx-danger);
}

label.invalid,
.form-control-feedback,
.invalid-feedback {
    color: var(--mx-danger-text);
    font-size: 13px;
}

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

legend {
    margin-bottom: 12px;
    font-size: 17px;
    font-weight: 700;
}

.control-group,
.form-group,
.mb-3 {
    margin-bottom: 18px;
}

.control-group .controls,
.form-group .controls {
    position: relative;
}

.form-text,
.small,
small {
    font-size: 13px;
    color: var(--mx-muted);
}

.star {
    color: var(--mx-danger);
}

.form-check {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 32px;
}

.form-check-input,
input[type="checkbox"],
input[type="radio"] {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: var(--mx-primary);
    flex: none;
}

.form-check-label {
    margin: 0;
    font-weight: 500;
}

.input-group {
    display: flex;
    align-items: stretch;
    width: 100%;
}

.input-group > .form-control {
    flex: 1 1 auto;
    min-width: 0;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.input-group > .btn,
.input-group > .input-group-text {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    margin-left: -1px;
}

.input-group-text {
    display: flex;
    align-items: center;
    padding: 0 12px;
    border: 1px solid var(--mx-border-strong);
    border-radius: var(--mx-radius-sm);
    background: var(--mx-surface-2);
    color: var(--mx-muted);
}

.input-password-toggle {
    min-width: 48px;
}

/* ---------- Tables ---------- */

table {
    border-collapse: collapse;
}

.table {
    width: 100%;
    background: var(--mx-surface);
    font-size: 14px;
}

.table th,
.table td {
    padding: 12px;
    border-bottom: 1px solid var(--mx-border);
    text-align: left;
    vertical-align: middle;
}

.table thead th {
    background: var(--mx-surface-2);
    color: var(--mx-muted);
    font-size: 12px;
    font-weight: 600;
}

.table-striped tbody tr:nth-child(odd) {
    background: #FAFBFC;
}

.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* ---------- Alerts and system messages ---------- */

#system-message-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

joomla-alert,
.alert {
    display: block;
    padding: 14px 16px;
    border: 1px solid var(--mx-border);
    border-left-width: 1px;
    border-radius: var(--mx-radius-sm);
    background: var(--mx-surface);
    color: var(--mx-text);
    font-size: 14px;
}

joomla-alert[type="success"],
.alert-success {
    background: var(--mx-ok-soft);
    border-color: color-mix(in srgb, var(--mx-ok) 30%, #fff);
    color: var(--mx-ok-text);
}

joomla-alert[type="info"],
.alert-info {
    background: var(--mx-info-soft);
    border-color: color-mix(in srgb, var(--mx-info) 30%, #fff);
    color: var(--mx-info-text);
}

joomla-alert[type="warning"],
.alert-warning {
    background: var(--mx-warn-soft);
    border-color: color-mix(in srgb, var(--mx-accent) 40%, #fff);
    color: var(--mx-warn-text);
}

joomla-alert[type="danger"],
joomla-alert[type="error"],
.alert-danger,
.alert-error {
    background: var(--mx-danger-soft);
    border-color: color-mix(in srgb, var(--mx-danger) 30%, #fff);
    color: var(--mx-danger-text);
}

joomla-alert .alert-heading {
    display: none;
}

joomla-alert .alert-wrapper,
joomla-alert .alert-message {
    font-size: 14px;
}

joomla-alert .joomla-alert--close {
    color: inherit;
}

/* ---------- Badges, lists, pagination ---------- */

.badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 999px;
    background: var(--mx-surface-2);
    color: var(--mx-muted);
    font-size: 12px;
    font-weight: 600;
}

.bg-success { background: var(--mx-ok-soft) !important; color: var(--mx-ok-text) !important; }
.bg-info { background: var(--mx-info-soft) !important; color: var(--mx-info-text) !important; }
.bg-warning { background: var(--mx-warn-soft) !important; color: var(--mx-warn-text) !important; }
.bg-danger { background: var(--mx-danger-soft) !important; color: var(--mx-danger-text) !important; }

.list-group {
    display: flex;
    flex-direction: column;
    padding: 0;
    margin: 0;
    list-style: none;
}

.list-group-item {
    display: block;
    padding: 10px 0;
    color: var(--mx-primary);
    font-size: 14px;
}

.list-unstyled {
    list-style: none;
    padding-left: 0;
}

.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    list-style: none;
    padding: 0;
    margin: 16px 0;
}

.page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 10px;
    border: 1px solid var(--mx-border);
    border-radius: var(--mx-radius-sm);
    background: var(--mx-surface);
    color: var(--mx-text);
    font-size: 14px;
    text-decoration: none;
}

.page-item.active .page-link {
    background: var(--mx-primary);
    border-color: var(--mx-primary);
    color: #fff;
}

.page-item.disabled .page-link {
    color: #9AA5B1;
}

.page-header {
    margin-bottom: 18px;
}

/* ---------- Small utilities used by Joomla core layouts ---------- */

.d-none { display: none !important; }
.d-block { display: block !important; }
.d-flex { display: flex !important; }
.w-100 { width: 100% !important; }
.mt-2 { margin-top: 8px !important; }
.mt-3 { margin-top: 16px !important; }
.mb-0 { margin-bottom: 0 !important; }
.mb-2 { margin-bottom: 8px !important; }
.text-muted { color: var(--mx-muted) !important; }
.text-center { text-align: center !important; }
.text-end { text-align: right !important; }
.float-end { float: right; }
.float-start { float: left; }
.clearfix::after { content: ""; display: table; clear: both; }

/* ---------- Login, password reset, offline and error pages ---------- */

.mx--auth {
    background: var(--mx-bg);
}

.mx-auth {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 16px;
}

.mx-auth__card {
    width: 100%;
    max-width: 420px;
    padding: 36px 32px 28px;
    background: var(--mx-surface);
    border: 1px solid var(--mx-border);
    border-radius: 6px;
    box-shadow: 0 12px 40px rgba(16, 24, 32, .08);
}

.mx-auth__brand {
    display: flex;
    justify-content: center;
    margin-bottom: 28px;
}

.mx-auth__brand .mx-logo {
    height: 40px;
    width: auto;
    max-width: 240px;
}

.mx-auth__intro {
    text-align: center;
    color: var(--mx-muted);
}

.mx-auth__body .page-header h1,
.mx-auth__body h1 {
    font-size: 20px;
    text-align: center;
}

.mx-auth .com-users-login__form,
.mx-auth .com-users-reset__form,
.mx-auth .com-users-remind__form {
    margin: 0;
}

.mx-auth .com-users-login__submit .btn,
.mx-auth .controls > .btn-primary,
.mx-auth__form .btn {
    width: 100%;
}

.mx-auth .com-users-login__options {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px 18px;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--mx-border);
}

.mx-auth .com-users-login__options .list-group-item {
    padding: 6px 0;
    font-size: 13px;
}

.mx-auth #system-message-container {
    margin-bottom: 16px;
}

.mx-error__code {
    margin: 0;
    text-align: center;
    font-size: 56px;
    font-weight: 800;
    letter-spacing: -.03em;
    color: var(--mx-accent);
    line-height: 1;
}

.mx-error__title {
    margin: 12px 0 8px;
    text-align: center;
    font-size: 20px;
}

.mx-error__text {
    text-align: center;
    color: var(--mx-muted);
}

.mx--error .mx-auth__card p:last-of-type {
    text-align: center;
}

.mx-error__debug {
    margin-top: 20px;
    max-height: 50vh;
    overflow: auto;
    font-size: 12px;
}

@media (max-width: 599.98px) {
    .mx-auth {
        align-items: flex-start;
        padding: 16px 12px;
    }

    .mx-auth__card {
        padding: 28px 20px 22px;
    }
}

/* ---------- Print view (tmpl=component) ---------- */

.mx--component {
    padding: 16px;
    background: var(--mx-surface);
}

@media print {
    .mx-sidebar,
    .mx-mobilebar,
    .mx-topbar__actions,
    .mx-backdrop,
    .mx-skip {
        display: none !important;
    }

    .mx-shell {
        display: block;
    }

    body {
        background: #fff;
    }
}

/* ---------- Keep compact controls inside data grids ---------- */

.tabulator input,
.tabulator select,
.tabulator textarea {
    min-height: 0;
    padding: 4px 6px;
    border-radius: 4px;
    font-size: 13px;
}

.tabulator select {
    padding-right: 24px;
    background-position: right 6px center;
}

.com-users-login__remember {
    margin-bottom: 18px;
}

/* ---------- Collapsed sidebar (icons only, desktop) ---------- */

.mx-wide .mx-sidebar {
    transition: width .2s ease, flex-basis .2s ease, padding .2s ease;
}

.mx-wide.mx-collapsed .mx-sidebar {
    flex-basis: 72px;
    width: 72px;
    padding: 18px 10px 12px;
    gap: 16px;
    overflow-x: hidden;
}

.mx-wide.mx-collapsed .mx-sidebar__head {
    flex-direction: column;
    gap: 10px;
    padding: 0;
}

.mx-wide.mx-collapsed .mx-logo--light {
    display: none;
}

.mx-wide.mx-collapsed .mx-logo--mark {
    display: block;
    width: 32px;
    height: 32px;
}

.mx-wide.mx-collapsed .mx-sidebar__collapse svg {
    transform: rotate(180deg);
}

.mx-wide.mx-collapsed .mx-sidebar__nav .mx-nav__link {
    justify-content: center;
    gap: 0;
    padding: 0;
}

.mx-wide.mx-collapsed .mx-sidebar__nav .mx-nav__label,
.mx-wide.mx-collapsed .mx-sidebar__nav .mx-nav__chevron {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

.mx-wide.mx-collapsed .mx-sidebar__nav .mx-nav__item.has-children > .mx-nav__link:not(.mx-nav__toggle) {
    padding-right: 0;
}

.mx-wide.mx-collapsed .mx-sidebar__nav .mx-nav__expand,
.mx-wide.mx-collapsed .mx-sidebar__nav .mx-nav__sub,
.mx-wide.mx-collapsed .mx-sidebar__extra {
    display: none;
}

.mx-wide.mx-collapsed .mx-sidebar__nav .mx-nav__item.is-active.has-children > .mx-nav__link {
    background: var(--mx-nav-hover);
    color: #fff;
}

.mx-wide.mx-collapsed .mx-sidebar__nav .mx-nav__divider {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--mx-nav-line);
}

.mx-wide.mx-collapsed .mx-sidebar__nav .mx-nav__heading {
    display: none;
}

.mx-wide.mx-collapsed .mx-user {
    flex-direction: column;
    gap: 6px;
    padding: 12px 0 0;
}

.mx-wide.mx-collapsed .mx-user__name {
    display: none;
}


/* Name tooltip and submenu flyout beside the collapsed sidebar */

.mx-flyout {
    position: fixed;
    z-index: 200;
    min-width: 180px;
    max-width: 280px;
    padding: 6px;
    border-radius: 4px;
    background: var(--mx-primary);
    color: #fff;
    box-shadow: var(--mx-shadow-lg);
    font-size: var(--mx-menu-fs, 15px);
}

.mx-flyout[hidden] {
    display: none;
}

.mx-flyout--tip {
    min-width: 0;
    padding: 7px 12px;
    font-weight: 600;
    white-space: nowrap;
    pointer-events: none;
}

.mx-flyout__title {
    padding: 8px 10px 6px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: color-mix(in srgb, #fff 60%, var(--mx-primary));
}

.mx-flyout__list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mx-flyout__link {
    display: flex;
    align-items: center;
    min-height: 40px;
    padding: 0 10px;
    border-radius: var(--mx-radius-xs);
    color: var(--mx-nav-text);
    text-decoration: none;
}

.mx-flyout__link:hover,
.mx-flyout__link:focus-visible {
    background: var(--mx-nav-hover);
    color: #fff;
}

.mx-flyout__link[aria-current="page"] {
    background: var(--mx-nav-active);
    color: #fff;
    font-weight: 600;
}

/* ---------- Focus on dark surfaces ---------- */

.mx-sidebar :focus-visible,
.mx-flyout :focus-visible,
.mx-usermenu :focus-visible {
    box-shadow: var(--mx-focus-dark);
}

/* ---------- User menu (popup from the user name) ---------- */

.mx-user__toggle {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    margin: 0;
    padding: 8px;
    border: 0;
    border-radius: var(--mx-radius-sm);
    background: transparent;
    color: #fff;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.mx-user__toggle:hover,
.mx-user__toggle[aria-expanded="true"] {
    background: var(--mx-nav-hover);
}

.mx-user__chevron {
    flex: none;
    color: var(--mx-nav-text);
    transition: transform .2s;
}

.mx-user__toggle[aria-expanded="true"] .mx-user__chevron {
    transform: rotate(180deg);
}

.mx-usermenu {
    position: fixed;
    z-index: 210;
    min-width: 220px;
    max-width: 300px;
    max-height: calc(100vh - 32px);
    max-height: calc(100dvh - 32px);
    overflow-y: auto;
    padding: 10px 6px;
    border-radius: 4px;
    background: var(--mx-primary);
    border: 1px solid var(--mx-nav-line);
    box-shadow: var(--mx-shadow-lg);
    color: #fff;
    font-size: 14px;
}

.mx-usermenu[hidden] {
    display: none;
}

.mx-usermenu .mx-nav__link {
    min-height: 40px;
}

.mx-usermenu .mx-nav__sub {
    margin-left: 12px;
}

.mx-usermenu a:not(.mx-nav__link) {
    color: #fff;
}

.mx-wide.mx-collapsed .mx-user__toggle {
    flex: none;
    justify-content: center;
    margin: 0;
    padding: 4px;
}

.mx-wide.mx-collapsed .mx-user__chevron {
    display: none;
}


/* ---------- Top bar: title or left modules, right modules on the same row ---------- */

.mx-topbar__start {
    flex: 1 1 320px;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mx-topbar__start .mx-topbar__title {
    flex: none;
}

.mx-topbar__modules {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.mx-topbar__modules > *,
.mx-topbar__actions > * {
    margin: 0;
}

.mx-narrow .mx-topbar__start {
    flex: 1 1 100%;
}


/* ---------- Top bar menu layout (desktop) ---------- */

.mx-wide .mx--top .mx-shell {
    flex-direction: column;
}

.mx-wide .mx--top .mx-sidebar {
    position: sticky;
    top: 0;
    z-index: 60;
    flex: none;
    width: auto;
    height: auto;
    min-height: 64px;
    flex-direction: row;
    align-items: center;
    gap: 20px;
    padding: 0 var(--mx-pad);
    overflow: visible;
    transition: transform .25s ease;
}

.mx-wide .mx--top .mx-sidebar__head {
    flex: none;
    padding: 0;
}

.mx-wide .mx--top .mx-sidebar__brand .mx-logo {
    height: 32px;
}

.mx-wide .mx--top .mx-sidebar__nav {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    justify-content: flex-end;
}

.mx-wide .mx--top .mx-sidebar__nav .mx-nav {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
    gap: 2px;
}

.mx-wide .mx--top .mx-sidebar__nav .mx-nav > .mx-nav__item {
    display: flex;
    align-items: center;
    border-radius: var(--mx-radius-sm);
    transition: background-color .15s;
}

.mx-wide .mx--top .mx-sidebar__nav .mx-nav > .mx-nav__item:hover,
.mx-wide .mx--top .mx-sidebar__nav .mx-nav > .mx-nav__item:focus-within {
    background: var(--mx-nav-hover);
}

.mx-wide .mx--top .mx-sidebar__nav .mx-nav > .mx-nav__item.is-current,
.mx-wide .mx--top .mx-sidebar__nav .mx-nav > .mx-nav__item.is-active.has-children {
    background: var(--mx-nav-active);
}

.mx-wide .mx--top .mx-sidebar__nav .mx-nav > .mx-nav__item > .mx-nav__link,
.mx-wide .mx--top .mx-sidebar__nav .mx-nav > .mx-nav__item > .mx-nav__expand,
.mx-wide .mx--top .mx-sidebar__nav .mx-nav > .mx-nav__item > .mx-nav__link:hover,
.mx-wide .mx--top .mx-sidebar__nav .mx-nav > .mx-nav__item > .mx-nav__expand:hover,
.mx-wide .mx--top .mx-sidebar__nav .mx-nav > .mx-nav__item.is-current > .mx-nav__link {
    background: transparent;
}

.mx-wide .mx--top .mx-sidebar__nav .mx-nav > .mx-nav__item:hover > .mx-nav__link,
.mx-wide .mx--top .mx-sidebar__nav .mx-nav > .mx-nav__item:hover > .mx-nav__expand {
    color: #fff;
}

.mx-wide .mx--top .mx-sidebar__nav .mx-nav > .mx-nav__item > .mx-nav__link {
    width: auto;
    padding: 0 12px;
    gap: 8px;
}

.mx-wide .mx--top .mx-sidebar__nav .mx-nav > .mx-nav__item > .mx-nav__link .mx-nav__label {
    overflow: visible;
}

.mx-wide .mx--top .mx-sidebar__nav .mx-nav > .mx-nav__item.has-children > .mx-nav__link:not(.mx-nav__toggle) {
    padding-right: 4px;
}

.mx-wide .mx--top .mx-sidebar__nav .mx-nav > .mx-nav__item > .mx-nav__expand {
    position: static;
    width: 28px;
}

.mx-wide .mx--top .mx-sidebar__nav .mx-nav > .mx-nav__item > .mx-nav__sub {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: auto;
    z-index: 70;
    min-width: 220px;
    max-width: 320px;
    margin: 0;
    padding: 6px;
    border: 1px solid var(--mx-nav-line);
    border-radius: 0 0 4px 4px;
    background: var(--mx-primary);
    box-shadow: var(--mx-shadow-lg);
}

.mx-wide .mx--top .mx-sidebar__nav .mx-nav > .mx-nav__item > .mx-nav__sub.is-end {
    left: auto;
    right: 0;
}

.mx-wide .mx--top .mx-sidebar__nav .mx-nav__sub .mx-nav__link {
    width: 100%;
}

.mx-wide .mx--top .mx-sidebar__nav .mx-nav__sub .mx-nav__sub {
    position: static;
    margin: 2px 0 6px 12px;
    padding: 0 0 0 10px;
    border: 0;
    border-left: 1px solid var(--mx-nav-line);
    box-shadow: none;
}

.mx-wide .mx--top .mx-sidebar__nav .mx-nav > .mx-nav__divider {
    margin: 0;
}

.mx-wide .mx--top .mx-sidebar__nav .mx-nav > .mx-nav__divider .mx-nav__heading {
    display: none;
}

.mx-wide .mx--top .mx-sidebar__extra {
    flex: none;
}

.mx-wide .mx--top .mx-user {
    flex: none;
    padding: 0;
    border-top: 0;
}

.mx-wide .mx--top .mx-user__toggle {
    margin: 0;
}

.mx-wide .mx--top .mx-sidebar.mx-headroom-hidden {
    transform: translateY(-100%);
}


.mx-wide.mx-mid .mx--top .mx-user__name {
    display: none;
}


/* ---------- Bar hides on scroll down, returns on scroll up (phones) ---------- */

.mx-narrow .mx-mobilebar {
    transition: transform .25s ease;
}

.mx-narrow .mx-mobilebar.mx-headroom-hidden {
    transform: translateY(-100%);
}


/* ---------- Back to top button ---------- */

.mx-totop {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 80;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--mx-border);
    border-radius: 50%;
    background: color-mix(in srgb, var(--mx-surface) 92%, transparent);
    color: var(--mx-muted);
    box-shadow: 0 2px 8px rgba(16, 24, 32, .08);
    cursor: pointer;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity .2s, transform .2s, color .15s, border-color .15s;
}

.mx-totop.is-visible {
    opacity: 1;
    transform: none;
}

.mx-totop:hover {
    color: var(--mx-text);
    border-color: var(--mx-border-strong);
}

@media (max-width: 599.98px) {
    .mx-totop {
        right: 14px;
        bottom: 14px;
    }
}

@media print {
    .mx-totop {
        display: none !important;
    }
}

#mx-main:focus {
    box-shadow: none;
    outline: none;
}

.mx-wide .mx--top .mx-user__chevron {
    transform: rotate(180deg);
}

.mx-wide .mx--top .mx-user__toggle[aria-expanded="true"] .mx-user__chevron {
    transform: none;
}


.mx-wide .mx--top .mx-usermenu {
    border-radius: 0 0 4px 4px;
}

/* ---------- Small phones: less space between the menu bar and the first content ---------- */

@media (max-width: 574.98px) {
    .mx-narrow .mx-mobilebar + .mx-content {
        padding-top: 10px;
    }

    .mx-narrow .mx-topbar {
        padding-top: 10px;
    }
}

/* ---------- Bootstrap tab, collapse and fade behaviour used by components (e.g. Soleree form tabs) ---------- */

.tab-content > .tab-pane {
    display: none;
}

.tab-content > .active {
    display: block;
}

.fade {
    transition: opacity .15s linear;
}

.fade:not(.show) {
    opacity: 0;
}

.collapse:not(.show) {
    display: none;
}

.collapsing {
    height: 0;
    overflow: hidden;
    transition: height .35s ease;
}

/* ---------- Soleree list footer: one arrow on the rows-per-page select ---------- */

html .com-soleree .sr-grid .tabulator-footer .sr-footer-left select.tabulator-page-size {
    appearance: none;
    -webkit-appearance: none;
    padding-right: 26px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%235F6B76' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 6px center;
    background-size: 14px;
}

/* ---------- Form validation: the red label and field show the error; the message text is kept for screen readers only ---------- */

label .form-control-feedback {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* ---------- Password show/hide icon (Joomla icon classes without the icon font) ---------- */

.input-password-toggle .icon-eye,
.input-password-toggle .icon-eye-slash {
    display: inline-block;
    width: 18px;
    height: 18px;
    background-color: currentColor;
    -webkit-mask: var(--mx-eye) center / contain no-repeat;
    mask: var(--mx-eye) center / contain no-repeat;
}

.input-password-toggle .icon-eye {
    --mx-eye: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7S2 12 2 12z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E");
}

.input-password-toggle .icon-eye-slash {
    --mx-eye: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9.9 4.2A10 10 0 0 1 12 4c6.5 0 10 8 10 8a17 17 0 0 1-2.2 3.2M6.6 6.6A17 17 0 0 0 2 12s3.5 7 10 7a9.7 9.7 0 0 0 5.4-1.6M9.9 9.9a3 3 0 0 0 4.2 4.2M2 2l20 20'/%3E%3C/svg%3E");
}

.input-password-toggle .icon-eye::before,
.input-password-toggle .icon-eye-slash::before {
    content: none;
}

/* ---------- Soleree form controls use the template control height ---------- */

.com-soleree .sr-form {
    --sr-control-height: var(--mx-control-h);
}

/* ---------- Username reminder: Joomla puts its intro text in the legend; show it like normal text ---------- */

.com-users-remind legend {
    margin-bottom: 1em;
    font-size: inherit;
    font-weight: 400;
    line-height: 1.5;
}

/* ---------- Soleree focus uses the template focus style ---------- */

.com-soleree {
    --sr-focus-border: var(--mx-focus-border);
    --sr-focus-shadow: var(--mx-focus);
}

.mx-user > .mx-user__avatar {
    margin-left: 8px;
}

/* ---------- Slide-in menu text size ---------- */

.mx-narrow .mx-sidebar .mx-nav__link,
.mx-narrow .mx-usermenu .mx-nav__link,
.mx-narrow .mx-user__name {
    font-size: var(--mx-menu-fs-mobile, 16px);
}

.mx-narrow .mx-sidebar .mx-nav__link {
    min-height: 48px;
}

.mx-narrow .mx-sidebar__head {
    padding-right: 3px;
}

/* ---------- Slide-in menu: a parent item and its arrow highlight as one row ---------- */

.mx-narrow .mx-sidebar__nav .mx-nav__item.has-children > .mx-nav__expand,
.mx-narrow .mx-sidebar__nav .mx-nav__item.has-children > .mx-nav__expand:hover,
.mx-narrow .mx-sidebar__nav .mx-nav__item.has-children > .mx-nav__expand:focus-visible {
    background: transparent;
    box-shadow: none;
}

.mx-narrow .mx-sidebar__nav .mx-nav__item.has-children:has(> .mx-nav__expand:hover) > .mx-nav__link,
.mx-narrow .mx-sidebar__nav .mx-nav__item.has-children:has(> .mx-nav__expand:active) > .mx-nav__link {
    background: var(--mx-nav-hover);
    color: #fff;
}

.mx-narrow .mx-sidebar__nav .mx-nav__item.has-children:has(> .mx-nav__expand:focus-visible) > .mx-nav__link {
    background: var(--mx-nav-hover);
    color: #fff;
    box-shadow: var(--mx-focus-dark);
}

.mx-narrow .mx-sidebar__nav .mx-nav__item.has-children:hover > .mx-nav__expand,
.mx-narrow .mx-sidebar__nav .mx-nav__item.has-children > .mx-nav__link:hover ~ .mx-nav__expand {
    color: #fff;
}

/* ---------- Desktop sidebar sits above the content, so its popups are not covered ---------- */

.mx-wide .mx-sidebar {
    z-index: 40;
}

/* ---------- Megamenu: column headings (Menu Item Headings under a top-level item) ---------- */

.mx-nav__colhead {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 10px 4px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: color-mix(in srgb, #fff 62%, var(--mx-primary));
}

.mx-nav__colhead .mx-icon {
    flex: none;
    width: 18px;
    height: 18px;
}

.mx-nav__colhead.mx-heading-lg,
.mx-flyout__colhead.mx-heading-lg {
    font-size: 15px;
    color: #fff;
}

.mx-nav__colhead.mx-heading-md,
.mx-flyout__colhead.mx-heading-md {
    font-size: 14px;
    color: #fff;
}

.mx-nav__colhead.mx-heading-lc,
.mx-flyout__colhead.mx-heading-lc {
    letter-spacing: 0;
    text-transform: none;
}

.mx-nav__colhead.mx-heading-lg-lc,
.mx-flyout__colhead.mx-heading-lg-lc {
    font-size: 15px;
    letter-spacing: 0;
    text-transform: none;
    color: #fff;
}

.mx-nav__colhead.mx-heading-md-lc,
.mx-flyout__colhead.mx-heading-md-lc {
    font-size: 14px;
    letter-spacing: 0;
    text-transform: none;
    color: #fff;
}

.mx-nav__colhead .mx-nav__label {
    overflow: visible;
    text-overflow: clip;
}

.mx-nav__sub.mx-mega__links {
    margin: 0 0 6px;
    padding: 0;
    border-left: 0;
}

/* Top bar: the dropdown shows the headings as columns */

.mx-wide .mx--top .mx-sidebar__nav .mx-nav > .mx-nav__item > .mx-nav__sub.mx-mega {
    display: grid;
    grid-template-columns: repeat(var(--mx-mega-cols, 2), minmax(190px, auto));
    align-items: start;
    gap: 0 12px;
    width: max-content;
    min-width: 0;
    max-width: min(1000px, calc(100vw - 32px));
    padding: 8px 10px 10px;
}

.mx-wide .mx--top .mx-sidebar__nav .mx-mega .mx-mega__links {
    position: static;
    margin: 0;
    padding: 0;
    border: 0;
    box-shadow: none;
    background: none;
}

/* Collapsed sidebar: the flyout shows the same columns */

.mx-flyout--mega {
    display: grid;
    grid-template-columns: repeat(var(--mx-mega-cols, 2), minmax(170px, auto));
    gap: 0 12px;
    width: max-content;
    max-width: min(760px, calc(100vw - 100px));
}

.mx-flyout--mega > .mx-flyout__title {
    grid-column: 1 / -1;
}

.mx-flyout__colhead {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px 4px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: color-mix(in srgb, #fff 62%, var(--mx-primary));
}


.mx-flyout__colhead .mx-icon {
    flex: none;
    width: 16px;
    height: 16px;
}

/* ---------- Modules other than menus in the user menu popup ---------- */

.mx-popup-module {
    padding: 8px 12px;
}

.mx-popup-module__title {
    margin-bottom: 6px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: color-mix(in srgb, #fff 62%, var(--mx-primary));
}

.mx-popup-module > :last-child {
    margin-bottom: 0;
}

.mx-popup-module ul {
    margin-top: 0;
    margin-bottom: 0;
}

/* ---------- Content width for non-Soleree pages (articles etc.) ---------- */

.mx--boxed .mx-content,
.mx--boxed .mx-topbar {
    width: 100%;
    max-width: calc(var(--mx-content-w, 1320px) + 2 * var(--mx-pad));
    margin-inline: auto;
}

/* ---------- Articles: full-width image on top, info on one line ---------- */

.com-content-article .item-image {
    margin: 0 0 24px;
}

.com-content-article .item-image img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: var(--mx-radius);
}

.com-content-article .item-image .caption {
    margin-top: 6px;
    font-size: 13px;
    color: var(--mx-muted);
}

.article-info {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 2px 0;
    margin: 0 0 20px;
    font-size: 14px;
    color: var(--mx-muted);
}

.article-info .article-info-term {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

.article-info dd {
    margin: 0;
}

.article-info dd + dd::before {
    content: "|";
    margin: 0 10px;
    color: var(--mx-border-strong);
}

.article-info dd .icon-fw {
    display: none;
}

.com-content-article .page-header h1,
.com-content-article .page-header h2 {
    margin-bottom: 8px;
}
