/* Wspólne style dla wszystkich stron intencji */

:root {
    --font-family: "Public Sans", Arial, Helvetica, sans-serif;
    --bs-font-sans-serif: "Public Sans", Arial, Helvetica, sans-serif;
}

/* Domyślny kolor tekstu (jak WP #222) - tylko jasny motyw; :root ma tę samą
   specyficzność co [data-bs-theme=dark], więc nie wolno go tu nadpisywać */
html:not([data-bs-theme="dark"]) {
    --bs-body-color: #222;
    --bs-body-color-rgb: 34, 34, 34;
    --app-surface-bg: #fdfdfd;
    --lit-karta-tlo: color-mix(in srgb, var(--bs-primary) 5%, #fff);
}

/* Brak sidebara - zeruj rezerwę SmartAdmin (w tym set-nav-minified z localStorage) */
html {
    --menu-width: 0px !important;
    --menu-width-minified: 0px !important;
    /* Stała baza rem: SmartAdmin skacze 17px → 14px → 16px przy resize (max-width 992 / 1280) */
    font-size: 16px !important;
}

/* SmartAdmin przy ≤992px podnosi body do 1rem - trzymaj desktopową bazę na wszystkich szerokościach */
body {
    --bs-body-font-size: 0.875rem;
}

/* set-nav-dark daje lekko niebieskie tło treści - u nas białe */
.set-nav-dark:not([data-bs-theme="dark"]) {
    --app-content-background: #fff;
}

html[data-bs-theme] .app-wrap {
    grid-template-columns: minmax(0, 0) minmax(0, 1fr) !important;
    grid-template-areas:
        "header header"
        "main main"
        "main main" !important;
}

html[data-bs-theme] .app-header {
    left: 0 !important;
    margin-left: 0 !important;
}

.app-wrap {
    --app-header-height: 4rem;
    grid-template-rows: var(--app-header-height) auto !important;
}

.app-header {
    --app-header-height: 4rem;
    height: var(--app-header-height);
    background-color: transparent;
    background-image: linear-gradient(to bottom, var(--app-surface-bg, #fdfdfd), #fff);
    border-bottom: 1px solid var(--bs-border-color);
}

html[data-bs-theme="dark"] .app-header {
    background-color: var(--app-header-background, var(--bs-body-bg));
    background-image: none;
}

.app-sidebar {
    display: none !important;
    width: 0 !important;
}

/* Layout headera na dużych ekranach */
@media (min-width: 769px) {
    .app-header,
    .app-wrap {
        --app-header-height: 64px;
        --header-icon-size: 28px;
        --header-label-size: 14px;
        --header-nav-gap: 4px;
        --header-utility-btn-size: 44px;
        --header-btn-padding-y: 7px;
        --header-btn-padding-x: 8px;
        --header-btn-hover-size: 44px;
        --header-login-font-size: 14px;
        --header-login-padding-y: 8px;
        --header-login-padding-x: 18px;
        --header-login-radius: 20px;
        --header-section-gap: 8px;
    }

    .app-header {
        height: var(--app-header-height);
    }

    /* Header przyklejony na górze podczas przewijania */
    .app-header {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        z-index: 1050 !important;
        background-color: var(--app-surface-bg, #fdfdfd);
        background-image: none;
    }
    
    /* Usuń rezerwację miejsca na header w gridzie (bo jest fixed) */
    .app-wrap {
        grid-template-rows: 0 auto !important;
        padding-top: 0 !important;
    }
    
    /* Margin dla treści - uwzględnia wysokość headera */
    .app-content {
        margin-top: var(--app-header-height) !important;
    }
    
    /* Ograniczenie szerokości treści na większych ekranach */
    .app-content {
        display: flex !important;
        justify-content: center !important;
    }
    
    .app-content .content-wrapper {
        max-width: 1400px !important;
        width: 100% !important;
        margin: 0 auto !important;
    }
    
    .header-left {
        flex: 1 1 0;
        min-width: 0;
    }
    .header-center {
        flex: 0 0 auto;
    }
    .header-right {
        flex: 1 1 0;
        display: flex !important;
        justify-content: flex-end;
        min-width: 0;
    }
    /* Ukryj menu "Inne" na dużych ekranach */
    .header-menu-mobile-only {
        display: none !important;
    }
    /* Pokaż elementy tylko na desktopie */
    .header-menu-desktop-only {
        display: flex !important;
    }

    /* Stały rozmiar elementów górnego paska — niezależny od html font-size SmartAdmin */
    .app-header .btn-system {
        line-height: 1 !important;
        font-size: inherit;
    }

    .app-header .header-center .btn-system {
        gap: var(--header-nav-gap);
        padding: var(--header-btn-padding-y) var(--header-btn-padding-x);
    }

    .app-header .header-center .btn-system > i {
        width: var(--header-icon-size) !important;
        height: var(--header-icon-size) !important;
        font-size: var(--header-icon-size) !important;
        line-height: 1;
    }

    .app-header .header-center .btn-system > span {
        font-size: var(--header-label-size) !important;
        line-height: 1;
    }

    .app-header .btn-system::before {
        width: var(--header-btn-hover-size) !important;
        height: var(--header-btn-hover-size) !important;
    }

    .app-header .btn-system .sa-icon {
        width: var(--header-icon-size) !important;
        height: var(--header-icon-size) !important;
    }

    .app-header .btn-system .profile-image {
        width: var(--header-icon-size) !important;
        height: var(--header-icon-size) !important;
        max-width: var(--header-icon-size) !important;
        max-height: var(--header-icon-size) !important;
    }

    .app-header .btn-zaloguj-header {
        font-size: var(--header-login-font-size) !important;
        padding: var(--header-login-padding-y) var(--header-login-padding-x) !important;
        border-radius: var(--header-login-radius);
        line-height: 1.25;
        white-space: nowrap;
    }

    .header-right,
    .header-toolbar-guest {
        gap: var(--header-section-gap) !important;
    }

    .header-right .header-toolbar-tools-trigger,
    .header-right > .btn-system,
    .header-right > a.btn-system {
        width: var(--header-utility-btn-size);
        height: var(--header-utility-btn-size);
        padding: 0;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
}

/* Na mobilnych - normalny layout */
@media (max-width: 768px) {
    .header-container {
        justify-content: center !important;
        overflow: visible !important;
    }
    .header-left {
        display: none !important;
    }
    .header-center {
        flex: 1 1 auto;
        overflow: visible !important;
    }
    /* Pokaż menu "Inne" na mobilnych */
    .header-menu-mobile-only {
        display: block !important;
    }
    /* Ukryj prawą sekcję z ikonami na mobilnych */
    .header-menu-mobile-hidden {
        display: none !important;
    }
    /* Ukryj elementy widoczne tylko na desktopie */
    .header-menu-desktop-only {
        display: none !important;
    }

    .header-menu-mobile-only {
        overflow: visible;
    }

    .header-toolbar-tools-panel.header-toolbar-tools-panel--mobile-menu {
        position: absolute;
        bottom: calc(100% + 0.5rem);
        right: calc(100% + 0.5rem);
        top: auto;
        left: auto;
        transform: none;
        max-height: none;
        overflow: visible;
    }

    .header-toolbar-tools-panel--mobile-menu .narzedzia-sekcje-wrap--desktop {
        max-height: min(24rem, calc(100dvh - 7rem));
        overflow-y: auto;
    }
}

/* Ukryj footer na wszystkich ekranach */
.app-footer {
    display: none !important;
}

/* Górny pasek mobilny - domyślnie ukryty */
.app-header-top-mobile {
    display: none;
}

/* Na mobilnych - header na dole */
@media (max-width: 768px) {
    body, html {
        overflow-x: hidden;
        max-width: 100vw;
    }
    .app-header {
        position: fixed !important;
        bottom: 0 !important;
        top: auto !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        z-index: 1050 !important;
        overflow: visible !important;
        grid-area: unset !important;
        border-bottom: none !important;
        border-top: 1px solid var(--bs-border-color);
    }
    
    /* Górny pasek mobilny - widoczny tylko na mobilnych i tylko dla zalogowanych */
    .app-header-top-mobile {
        display: flex !important;
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        height: 2.5rem !important;
        z-index: 1040 !important;
        background-color: var(--bs-body-bg);
        border-bottom: 1px solid var(--bs-border-color);
        box-shadow: none !important;
        align-items: center;
    }
    
    /* Padding dla treści - domyślnie bez górnego paddingu */
    .app-body {
        padding-top: 0 !important;
        padding-bottom: var(--app-header-height) !important;
    }
    
    /* Padding dla treści - uwzględnia górny pasek tylko dla zalogowanych użytkowników */
    body.user-logged-in .app-body {
        padding-top: 2.5rem !important;
    }
    
    .app-wrap {
        grid-template-rows: 0 auto !important;
        padding-top: 0 !important;
    }

    /* Dolny pasek nawigacji — stałe rozmiary ikon i etykiet (neutralizacja SmartAdmin .btn-system) */
    .app-header {
        --header-icon-size: 1.75rem;
        --header-label-size: 0.75rem;
        --header-nav-gap: 0.25rem;
        --header-mobile-padding-inline: 1.5rem;
        padding-inline: var(--header-mobile-padding-inline) !important;
    }

    .app-header .header-center > a.btn-system:not(.header-menu-desktop-only),
    .app-header .header-center > .header-menu-mobile-only {
        flex: 0 0 auto;
        min-width: 0;
    }

    .app-header .header-center > .header-menu-mobile-only {
        display: flex;
        justify-content: center;
    }

    .app-header .header-center .btn-system,
    .app-header .header-menu-mobile-only > .btn-system {
        gap: var(--header-nav-gap);
        line-height: 1 !important;
        font-size: inherit;
        padding: 0.25rem 0;
        min-width: 0;
    }

    .app-header .header-menu-mobile-only > .btn-system {
        width: auto;
    }

    .app-header .header-center .btn-system > i,
    .app-header .header-menu-mobile-only > .btn-system > i {
        width: var(--header-icon-size) !important;
        height: var(--header-icon-size) !important;
        font-size: var(--header-icon-size) !important;
        line-height: 1;
    }

    .app-header .header-center .btn-system > span,
    .app-header .header-menu-mobile-only > .btn-system > span {
        font-size: var(--header-label-size) !important;
        line-height: 1;
        white-space: nowrap;
    }

    .app-header .header-center {
        width: 100%;
        flex: 1 1 100% !important;
        gap: 0 !important;
        padding-inline: 0;
        justify-content: space-between !important;
    }
}

/* Przyciski nagłówka — kolumna ikona + etykieta */
.header-btn-stack {
    gap: 0.25rem;
}

.header-btn-etykieta {
    font-size: 14px;
    line-height: 1;
}

.header-btn-stack.is-active {
    color: var(--bs-primary);
}

.header-btn-stack.is-active .sa-icon {
    color: var(--bs-primary);
}

.btn-system:disabled,
.btn-system[aria-disabled="true"] {
    opacity: 0.45;
    cursor: not-allowed;
}

/* Menu rozwijane mobilne */
.header-mobile-menu {
    position: absolute;
    bottom: calc(100% + 0.5rem);
    left: 50%;
    transform: translateX(-50%);
    background: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color);
    border-radius: 0.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: 0.5rem 0.25rem;
    min-width: 100px;
    z-index: 1060;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    opacity: 0;
    visibility: hidden;
    overflow: visible;
    transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
    transform: translateX(-50%) translateY(10px);
}
.header-mobile-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}
.header-mobile-menu button,
.header-mobile-menu a {
    width: 100%;
    justify-content: center;
    padding-inline: 0.125rem;
}

.header-mobile-menu .header-toolbar-tools-trigger {
    width: 2.5rem;
    margin-inline: auto;
}

.header-mobile-menu .header-toolbar-tools-trigger--mobile-menu {
    width: 2.5rem;
}

/* Strzałka wskaźnikowa */
.header-mobile-menu::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid var(--bs-body-bg);
}
.header-mobile-menu::before {
    content: '';
    position: absolute;
    bottom: -9px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 9px solid transparent;
    border-right: 9px solid transparent;
    border-top: 9px solid var(--bs-border-color);
}

/* Status intencji - wspólny dla wszystkich stron */
.status-podjeta {
    background-color: #2e86ab;
    color: white;
    padding: 0.15rem 0.35rem;
    border-radius: 0.2rem;
    font-size: 0.7125rem !important;
    font-weight: bold;
    white-space: nowrap;
}
.status-nie-podjeta {
    background-color: #f0ad4e;
    color: white;
    padding: 0.15rem 0.35rem;
    border-radius: 0.2rem;
    font-size: 0.7125rem !important;
    font-weight: bold;
    white-space: nowrap;
}

/* H1 - widoczny na wszystkich ekranach, wyśrodkowany */
.panel-content {
    padding-top: 0.5rem !important;
}
.panel-content h1 {
    text-align: center;
    font-size: 0.95rem !important;
    font-weight: 500;
    color: var(--bs-secondary);
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding-top: 0.5rem;
    padding-bottom: 0.75rem;
}

/* Kolor nagłówka w ciemnym trybie */
[data-bs-theme="dark"] .panel-content h1,
[data-bs-theme="dark"] .card-header h1 {
    color: rgba(255, 255, 255, 0.7) !important;
}

@media (max-width: 768px) {
    .panel-content h1 {
        font-size: 0.85rem !important;
        padding-top: 0.3rem;
        padding-bottom: 0.5rem;
    }
}

/* Usuń shadow z wszystkich paneli */
.panel {
    box-shadow: none !important;
    -webkit-box-shadow: none !important;
}

/* Przyciski Bootstrap/SmartAdmin — bez cienia (konwencja projektu) */
.btn,
.btn:hover,
.btn:focus,
.btn:active,
.btn.active,
.btn.show,
.btn:first-child:active,
:not(.btn-check) + .btn:active {
    box-shadow: none !important;
    -webkit-box-shadow: none !important;
}

/* Rozjaśnione tło alertu warning - pośredni pomarańcz */
.alert-warning {
    background-color: #fff5d6 !important;
    border-color: #ffe3a7 !important;
}

/* Alert warning w trybie ciemnym */
[data-bs-theme="dark"] .alert-warning {
    background-color: #5c4a1a !important;
    border-color: #b8943d !important;
    color: #f5e6b8 !important;
}

/* Rozjaśnione tło alertu info - jasny niebieski */
.alert-info {
    background-color: #b2dbfb !important;
    border-color: #82c4f8 !important;
    color: #0d3a5c !important;
}

/* Alert info w trybie ciemnym */
[data-bs-theme="dark"] .alert-info {
    background-color: #1a3a5c !important;
    border-color: #3d7bb8 !important;
    color: #a8d5f0 !important;
}

/* Przycisk submit w formularzu dodawania intencji - bez cienia */
#dodaj_intencje_form button[type="submit"] {
    box-shadow: none !important;
    -webkit-box-shadow: none !important;
}

/* Przycisk submit w trybie ciemnym */
[data-bs-theme="dark"] #dodaj_intencje_form button[type="submit"] {
    background-color: #0d6efd !important;
    border-color: #0d6efd !important;
    color: #fff !important;
}

[data-bs-theme="dark"] #dodaj_intencje_form button[type="submit"]:hover {
    background-color: #0b5ed7 !important;
    border-color: #0a58ca !important;
}

/* Ikony trybu w menu dropdown - wyświetlanie tylko jednej ikony w zależności od trybu */
.dropdown-menu .sa-mode-light {
    display: none;
}
html[data-bs-theme="dark"] .dropdown-menu .sa-mode-light {
    display: block;
}
html[data-bs-theme="dark"] .dropdown-menu .sa-mode-dark {
    display: none;
}

/* Link "Edytuj profil" - styl badge jak przycisk ulubionych */
a.link-edytuj-profil {
    text-decoration: none;
    transition: filter 0.15s ease;
}
a.link-edytuj-profil:hover {
    filter: brightness(1.1);
    text-decoration: none;
}

/* Dropdown powiadomień - padding z lewej na małych ekranach */
@media (max-width: 768px) {
    .btn-system[data-bs-toggle=dropdown] + .dropdown-menu.dropdown-xl,
    .dropdown-menu.dropdown-xl.dropdown-menu-end {
        left: 0.5rem !important;
        right: 0.5rem !important;
        padding-left: 0.75rem !important;
        padding-right: 0.75rem !important;
    }
}

/* Kolor nazwy użytkownika w powiadomieniach - taki sam jak tło status-podjeta i pogrubiona */
.notification .name {
    color: #2e86ab !important;
    font-weight: 600 !important;
}

/* Kolor nazwy użytkownika w powiadomieniach - tryb ciemny (jaśniejszy dla lepszej widoczności) */
[data-bs-theme="dark"] .notification .name {
    color: #5ba8d1 !important;
    font-weight: 600 !important;
}

/* Separatory powiadomień: SmartAdmin ma rgba(0,0,0,.06) - niewidoczne w dark mode */
.notification li > :first-child {
    border-bottom-color: var(--bs-border-color);
}

/* Powiadomienia: nadpisanie SmartAdmin (.msg-a ma nowrap + ellipsis + max-width) */
.notification .powiadomienie-tresc .msg-a {
    display: block;
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
    max-width: none;
    word-break: break-word;
    overflow-wrap: anywhere;
}

.notification .powiadomienie-tresc .name {
    min-width: 0;
    word-break: break-word;
}

/* Sekcja administracyjna - czerwony kolor dla wszystkich elementów */
.admin-section {
    color: #dc3545 !important;
}

.admin-section .dropdown-header {
    color: #dc3545 !important;
}

.admin-section .dropdown-item {
    color: #dc3545 !important;
}

.admin-section .dropdown-item span {
    color: #dc3545 !important;
}

/* Badge w sekcji administracyjnej - biały tekst na czerwonym tle */
.admin-section .dropdown-item .badge {
    color: #ffffff !important;
}

.admin-section .dropdown-item:hover {
    background-color: rgba(220, 53, 69, 0.1) !important;
    color: #dc3545 !important;
}

.admin-section .dropdown-item.disabled {
    color: rgba(220, 53, 69, 0.6) !important;
}

/* Sekcja administracyjna w trybie ciemnym */
[data-bs-theme="dark"] .admin-section {
    color: #ff6b7a !important;
}

[data-bs-theme="dark"] .admin-section .dropdown-header {
    color: #ff6b7a !important;
}

[data-bs-theme="dark"] .admin-section .dropdown-item {
    color: #ff6b7a !important;
}

[data-bs-theme="dark"] .admin-section .dropdown-item span {
    color: #ff6b7a !important;
}

/* Badge w sekcji administracyjnej w trybie ciemnym - biały tekst na czerwonym tle */
[data-bs-theme="dark"] .admin-section .dropdown-item .badge {
    color: #ffffff !important;
}

[data-bs-theme="dark"] .admin-section .dropdown-item:hover {
    background-color: rgba(255, 107, 122, 0.15) !important;
    color: #ff6b7a !important;
}

[data-bs-theme="dark"] .admin-section .dropdown-item.disabled {
    color: rgba(255, 107, 122, 0.5) !important;
}

/* Aktywna pozycja menu głównego w headerze */
.header-center > a.btn-system.header-menu-aktywny,
.header-mobile-menu > a.btn-system.header-menu-aktywny {
    color: var(--bs-primary) !important;
}

.header-center > a.btn-system.header-menu-aktywny i,
.header-mobile-menu > a.btn-system.header-menu-aktywny i {
    color: var(--bs-primary) !important;
}

/* Panel narzędzi — wspólne (desktop gość + mobile menu „Inne”) */
.header-toolbar-tools-trigger {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.header-toolbar-tools-trigger:hover,
.header-toolbar-tools-trigger:focus {
    background-color: var(--bs-secondary-bg);
}

.header-toolbar-tools-panel {
    min-width: 18rem;
    padding: 0;
    border-radius: 1.25rem;
    background: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color);
    box-shadow: var(--bs-box-shadow-lg);
    z-index: 1080;
    display: none;
    overflow: hidden;
}

.header-toolbar-tools-panel.show {
    display: block;
}

/* Panel narzędzi nagłówka — desktop */
@media (min-width: 769px) {
    .header-toolbar-guest,
    .header-toolbar-user {
        position: relative;
    }

    .header-toolbar-guest-wrap,
    .header-toolbar-user-wrap {
        position: relative;
    }

    .header-toolbar-tools-panel {
        position: absolute;
        top: calc(100% + 0.5rem);
        right: 0;
    }
}

/* Sekcje narzędzi strony — panel gościa desktop i menu mobilne „Inne” */
.narzedzia-sekcje-wrap {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.narzedzia-sekcje-wrap--desktop {
    padding: 0.75rem;
}

.narzedzia-sekcje-wrap--mobile {
    margin-top: 0.5rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--bs-border-color);
}

.narzedzia-sekcja + .narzedzia-sekcja {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--bs-border-color);
}

.narzedzia-sekcja-tytul {
    font-size: 14px;
    font-weight: 600;
    color: var(--bs-secondary-color);
    margin-bottom: 0.5rem;
}

.narzedzia-wiersz {
    display: grid;
    gap: 0.5rem;
}

.narzedzia-wiersz--tekst {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.narzedzia-wiersz--przyciski-czcionki {
    display: flex;
    gap: 0.5rem;
}

.narzedzia-wiersz--przyciski-czcionki .header-btn-stack {
    flex: 1 1 0;
}

.narzedzia-wiersz--widok {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.narzedzia-kafel {
    min-height: 4.25rem;
    border: 1px solid var(--bs-border-color);
    border-radius: 0.625rem;
    background: var(--bs-body-bg);
    color: var(--bs-body-color);
    text-decoration: none;
    padding: 0.625rem 0.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    font-size: 14px;
    line-height: 1.2;
    text-align: center;
    cursor: pointer;
}

.narzedzia-kafel:hover {
    background-color: var(--bs-secondary-bg);
    color: var(--bs-body-color);
    text-decoration: none;
}

.narzedzia-kafel:focus-visible {
    outline: 2px solid var(--bs-primary);
    outline-offset: 2px;
}

.narzedzia-kafel.is-active {
    border-color: var(--bs-primary);
    background-color: rgba(var(--bs-primary-rgb), 0.08);
    color: var(--bs-primary);
}

.narzedzia-kafel.is-active .narzedzia-kafel-ikona .sa-icon {
    color: var(--bs-primary);
}

.narzedzia-kafel:disabled,
.narzedzia-kafel[disabled] {
    opacity: 0.45;
    cursor: not-allowed;
}

.narzedzia-kafel-ikona {
    min-height: 1.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.narzedzia-kontakt {
    flex-direction: row;
    justify-content: center;
    width: 100%;
    min-height: 2.75rem;
    gap: 0.5rem;
}

.narzedzia-kontakt .sa-icon {
    color: var(--bs-primary);
    flex-shrink: 0;
}

.header-mobile-menu .narzedzia-wiersz--przyciski-czcionki .header-btn-stack {
    width: auto;
}

