/* --- PODSTAWOWE STYLE --- */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    font-family: system-ui, sans-serif;
    background-color: #ffffff;
    position: relative;
}

#app-container {
    display: flex;
    height: 100%;
    width: 100%;
}

/* --- LEWY PANEL --- */
#lewy-panel-narzedzi {
    width: 60px;
    background-color: #333a44;
    padding: 10px 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
    height: 100vh;
    transition: width 0.3s ease;
    overflow: hidden;
    position: relative; 
    z-index: 2000; /* Zawsze na wierzchu */
}

#lewy-panel-narzedzi.expanded {
    width: 220px;
}

.gorne-ikony, .dolne-ikony {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.tool-icon {
    color: #b0b8c5;
    padding: 12px;
    margin: 4px 0;
    width: 100%;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    height: 52px;
}

#lewy-panel-narzedzi.expanded .tool-icon {
    justify-content: flex-start;
    padding-left: 16px;
}


.tool-icon:hover {
    background-color: #4a5464;
    color: #ffffff;
}
.tool-icon.active {
    background-color: #007bff;
    color: white;
}
.tool-icon i {
    font-size: 28px;
    vertical-align: middle;
    flex-shrink: 0;
}

.icon-short, .icon-full {
    display: inline-block;
    white-space: nowrap;
    font-size: 16px;
    font-weight: bold;
}

.icon-full {
    display: none;
    opacity: 0;
    transition: opacity 0.2s ease;
}

#lewy-panel-narzedzi.expanded .icon-full {
    display: inline-block;
    opacity: 1;
}

/* --- GŁÓWNE WIDOKI --- */
#konfigurator-widok, #zapisane-oferty-widok {
    flex-grow: 1;
    padding: 15px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

#zapisane-oferty-widok button {
    width: auto;
    padding: 10px 20px;
}
.konfigurator-glowny, #innerdor-container {
    display: flex;
    width: 100%;
    height: 100%;
    background: #fff;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border-radius: 8px;
    flex-grow: 1;
}
.kolumna {
    padding: 20px;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

.kolumna-rysunek {
    flex: 0 0 38%;
    min-width: 0;
}
.kolumna-opcje {
    flex: 0 0 34%;
}
.kolumna-oferta {
    flex: 0 0 28%;
    background: #fafafa;
    min-height: 0;
    border-left: 1px solid #e0e0e0;
    border-right: 1px solid #e0e0e0;
}

.oferta-main-content {
    flex-grow: 1;
    min-height: 0;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}
.oferta-footer {
    flex-shrink: 0;
    margin-top: auto;
    padding-top: 15px;
}

#obszar-rysunkowy {
    flex-grow: 1;
    border: 1px solid #ccc;
    background-color: #fdfdfd;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    overflow: hidden;
    min-height: 300px;
    width: 100%;
    box-sizing: border-box;
    position: relative;
}

#obszar-rysunkowy svg {
    max-width: 95%;
    max-height: 95%;
    height: auto;
}


h2 { margin-top: 0; padding-bottom: 10px; border-bottom: 1px solid #e0e0e0; }
label { display: block; font-weight: 600; margin-top: 10px; margin-bottom: 4px; }
input[type="number"], input[type="text"], select, textarea { width: 100%; padding: 8px; border: 1px solid #ccc; border-radius: 4px; box-sizing: border-box; font-size: 14px; }
input[type="radio"] + label, input[type="checkbox"] + label { font-weight: normal; display: inline-block; margin-top: 0; margin-right: 15px;}
.radio-group-horizontal { display: flex; align-items: center; }
textarea { min-height: 80px; }
.numer-oferty-styl { font-weight: bold; font-size: 16px; padding: 8px; background-color: #eee; border-radius: 4px; display: block; text-align: center; color: #333; margin-bottom: 10px; }

/* --- AKORDEON --- */
#dodatkowe-opcje-kontener { margin: 15px 0; }
.accordion { background-color: #f1f1f1; color: #444; cursor: pointer; padding: 12px; width: 100%; border: none; text-align: left; outline: none; font-size: 15px; transition: 0.4s; border-bottom: 1px solid #ddd; }
.accordion.disabled { background-color: #e9ecef; color: #adb5bd; cursor: not-allowed; }
.active, .accordion:not(.disabled):hover { background-color: #e2e2e2; }
.accordion:after { content: '\002B'; color: #777; font-weight: bold; float: right; margin-left: 5px; }
.active:after { content: "\2212"; }
.panel { padding: 0 18px; background-color: white; max-height: 0; overflow: hidden; transition: max-height 0.2s ease-out; border-left: 1px solid #ddd; border-right: 1px solid #ddd; }
.panel .opcja-grupa { padding: 10px 0; }

.add-button { background-color: #28a745; color: white; border: none; border-radius: 50%; width: 24px; height: 24px; font-size: 16px; cursor: pointer; margin-left: 10px; padding: 0; line-height: 24px; text-align: center; }
.opcja-z-przyciskiem { display: flex; align-items: center; justify-content: space-between; }

.opcja-z-przyciskiem textarea#dodatkowy-komentarz {
    flex-grow: 1;
    resize: vertical;
}


hr { border: none; border-top: 1px solid #e0e0e0; margin: 15px 0; }
#cena-kontener { margin-top: 15px; padding: 15px; background-color: #f4f7f9; border: 1px solid #ccc; border-radius: 5px; font-size: 14px; }
.linia-ceny { display: flex; justify-content: space-between; padding: 4px 0; }
.linia-ceny.suma { font-weight: bold; font-size: 18px; color: #0d47a1; border-top: 1px solid #ccc; margin-top: 10px; padding-top: 10px; }

.przyciski-akcji {
    display: flex;
    gap: 10px;
    margin: 0 0 20px 0;
}
.przyciski-akcji button {
    flex-grow: 1;
    padding: 10px;
    font-size: 0.9em;
    border-radius: 5px;
    border: 1px solid #ccc;
    cursor: pointer;
    transition: background-color 0.2s;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.przyciski-akcji button i {
    font-size: 1.2em;
}

.przyciski-akcji button:hover {
    filter: brightness(0.95);
}
.przycisk-glowny {
    background-color: #28a745;
    color: white;
    border-color: #28a745;
}
#loken-add-to-main-cart-btn {
    background-color: #007bff;
    color: white;
    border-color: #007bff;
}

.przycisk-zapisu {
    background-color: #ff9800;
    color: white;
    border-color: #ff9800;
}
#loken-save-edit-btn {
    display: none;
}


#eksport-kontener { display: flex; flex-direction: column; gap: 10px; margin-top: 15px; }
.przycisk-eksportu { width: 100%; padding: 12px; color: white; font-size: 15px; font-weight: bold; border: none; border-radius: 5px; cursor: pointer; }
#eksport-pdf-z-cena { background-color: #007bff; }
#eksport-pdf-bez-ceny { background-color: #6c757d; }


/* --- NOWE STYLE OFERTY (LOKEN) --- */
#lista-oferty {}

#lista-oferty .pusta-lista {
    text-align: center;
    color: #888;
    margin-top: 50px;
}

.loken-pozycja-oferty {
    display: flex;
    flex-direction: column;
    padding: 8px 10px;
    border-bottom: 1px solid #e9e9e9;
    gap: 4px;
    border-left: 3px solid transparent;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.loken-pozycja-oferty.is-editing {
    background-color: #ffebee;
    border-left-color: #c62828;
}

.pozycja-gora {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pozycja-tytul {
    flex-grow: 1;
    font-size: 14px;
    line-height: 1.3;
    min-width: 0;
    white-space: pre-wrap;
    overflow-wrap: break-word;
}
.pozycja-tytul strong {
    color: #000;
    display: block;
}

.toggle-comment-btn {
    background: none;
    border: none;
    color: #007bff;
    cursor: pointer;
    font-size: 11px;
    padding: 0 5px;
    font-weight: bold;
}
.toggle-comment-btn:hover {
    text-decoration: underline;
}


.pozycja-mini-akcje {
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-self: stretch;
    justify-content: center;
}

.mini-action-btn {
    background: #f1f1f1;
    border: 1px solid #ddd;
    color: #555;
    width: 26px;
    height: 26px;
    padding: 0;
    font-size: 16px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s, color 0.2s;
}
.mini-action-btn:hover {
    background-color: #e0e0e0;
    color: #000;
}
.mini-btn-copy:hover { color: #007bff; }
.mini-btn-edit:hover { color: #ff9800; }


.pozycja-akcje {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    flex-shrink: 0;
}

.loken-kontrolka-grupa {
    display: flex;
    flex-direction: column;
    align-items: center;
}
.loken-kontrolka-grupa label {
    font-size: 10px;
    text-transform: uppercase;
    margin: 0 0 3px 0;
    font-weight: 600;
    color: #666;
    white-space: nowrap;
}
.loken-kontrolka-grupa input {
    width: 65px;
    padding: 4px;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    height: 28px;
    box-sizing: border-box;
    border-radius: 3px;
    border: 1px solid #b8b8b8;
}
.loken-kontrolka-grupa input[readonly] {
    background-color: #e9ecef;
    color: #495057;
}

.loken-kontrolka-grupa input[type=number]::-webkit-inner-spin-button {
    opacity: 1;
}


.loken-przycisk-usun {
    background: none;
    border: none;
    color: #dc3545;
    font-size: 24px;
    cursor: pointer;
    padding: 0 5px;
    align-self: center;
    line-height: 1;
    margin-left: 5px;
    transition: color 0.2s;
}
.loken-przycisk-usun:hover {
    color: #c82333;
}

.pozycja-dol {
    padding-left: 24px;
}

.loken-pozycja-detale {
    font-size: 12px;
    color: #555;
    word-wrap: break-word;
    white-space: normal;
    line-height: 1.4;
}

.loken-pozycja-detale span {
    display: inline;
    white-space: normal;
}
.loken-pozycja-detale span:not(.loken-komentarz):not(:last-child)::after {
    content: "·";
    margin: 0 6px;
    color: #ccc;
    font-weight: bold;
}

.loken-komentarz-wrapper {
    margin-top: 6px;
}
.oferta-input-komentarz {
    width: 100%;
    font-size: 12px;
    font-style: italic;
    color: #dc3545;
    font-weight: bold;
    border: 1px solid #f2c4c8;
    border-radius: 3px;
    padding: 4px 8px;
    background-color: #fff8f8;
    box-sizing: border-box;
    resize: vertical;
    min-height: 28px;
    line-height: 1.4;
    cursor: text !important;
    z-index: 10;
}
.oferta-input-komentarz::placeholder {
    color: #d39a9f;
    font-weight: normal;
}


/* --- POZOSTAŁE STYLE --- */
textarea#dodatkowy-komentarz {
    background-color: #fff !important;
    color: #000 !important;
    cursor: text !important;
}

#podsumowanie-oferty { padding-top: 15px; font-size: 14px; }
.linia-podsumowania {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 3px 0;
}
.linia-podsumowania span {
    white-space: nowrap;
}
.linia-podsumowania.total {
    font-weight: bold;
    font-size: 18px;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #ccc;
}
#globalny-rabat-kontener { margin-top: 15px; }

#lista-kategorii-produktu { display: flex; flex-direction: column; gap: 4px; }
.category-item { padding: 10px 15px; border-radius: 4px; cursor: pointer; transition: background-color 0.2s, color 0.2s; border: 1px solid #e0e0e0; font-size: 14px; text-align: center; }
.category-item:hover { background-color: #e9ecef; border-color: #ccc; }
.category-item.selected { background-color: #333a44; color: white; border-color: #333a44; font-weight: bold; }

.opcja-grupa-przyciski {
    display: flex;
    justify-content: space-around;
    gap: 5px;
}

.opcja-grupa-przyciski button {
    flex: 1;
    padding: 8px;
    border: 1px solid #ccc;
    background-color: #f8f9fa;
    cursor: pointer;
    border-radius: 4px;
}

.opcja-grupa-przyciski button.selected {
    background-color: #333a44;
    color: white;
    border-color: #333a44;
}

.kierunek-btn-rysunek {
    width: 40px;
    height: 40px;
    border: 1px solid #ccc;
    background-color: #f8f9fa;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
}
.kierunek-btn-rysunek.selected {
    background-color: #333a44;
    color: white;
}
.kierunek-btn-rysunek.active-red {
    background-color: #dc3545;
    color: white;
    border-color: #c82333;
}

.kierunek-btn-rysunek.active-blue {
    background-color: #007bff;
    color: white;
    border-color: #0069d9;
}

.dimension-input-wrapper { display: flex; align-items: center; }
.dimension-input-wrapper input { flex-grow: 1; -moz-appearance: textfield; }
.dimension-input-wrapper input::-webkit-outer-spin-button, .dimension-input-wrapper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.dimension-controls { display: flex; margin-left: 8px; }
.dim-btn { width: 30px; height: 38px; font-size: 20px; font-weight: bold; border: 1px solid #ccc; background-color: #f8f9fa; cursor: pointer; }
.dim-btn:hover { background-color: #e9ecef; }
.dim-btn.minus { border-radius: 4px 0 0 4px; border-right: none; }
.dim-btn.plus { border-radius: 0 4px 4px 0; }

#panel-sprosser .opcja-grupa {
    padding: 8px 0;
}
#panel-sprosser .opcja-grupa label {
    margin-bottom: 4px;
}
.przycisk-opcji {
    width: 100%;
    padding: 8px;
    background-color: #28a745;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
}
.przycisk-opcji:hover {
    background-color: #218838;
}
.przycisk-opcji-usun {
    width: 100%;
    padding: 8px;
    background-color: #dc3545;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
}
.przycisk-opcji-usun:hover {
    background-color: #c82333;
}

/* --- POPRAWKA: Przesunięcie stopki, żeby nie zasłaniała przycisków --- */
#signature-footer {
    position: fixed;
    bottom: 10px;
    left: 250px; /* Przesunięto w prawo, z dala od panelu bocznego */
    font-size: 12px;
    color: #8a8a8a;
    z-index: 1000;
    pointer-events: none; /* Myszka przenika przez napis */
}

.przycisk-zmiany-widoku {
    padding: 6px 10px;
    font-size: 12px;
    background-color: #f0f0f0;
    border: 1px solid #ccc;
    border-radius: 4px;
    cursor: pointer;
}
.przycisk-zmiany-widoku:hover {
    background-color: #e0e0e0;
}

/* NOWY STYL DLA OBRAZKA PRODUKTU W LOKEN */
#obszar-rysunkowy .produkt-zdjecie {
    max-width: 100%;
    max-height: 80vh;
    height: auto;
    width: auto;
    object-fit: contain;
}

/* NOWE STYLE DLA HARMONIJKI Z INFORMACJAMI O OFERCIE */
.accordion#offer-info-accordion {
    padding: 8px 12px;
    display: flex;
    align-items: center;
    height: 60px;
}

.accordion-header-content {
    display: flex;
    gap: 20px;
    width: 100%;
    align-items: center;
}

.offer-number-container, .offer-ref-container {
    display: flex;
    flex-direction: column;
}

.accordion-header-content label {
    font-size: 10px;
    font-weight: 600;
    color: #555;
    margin: 0 0 2px 0;
    text-transform: uppercase;
    white-space: nowrap;
}

.accordion-header-content .numer-oferty-styl {
    font-size: 14px;
    padding: 4px 8px;
    margin: 0;
    line-height: 1.2;
    background-color: #e9ecef;
    min-width: 130px;
    text-align: center;
}

.accordion-header-content input {
    font-size: 14px;
    padding: 4px 8px;
    height: 28px;
    box-sizing: border-box;
    min-width: 150px;
}

/* --- STYLE DLA MODALU RYSUNKÓW TECHNICZNYCH --- */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.modal-header {
    padding: 15px 20px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.modal-header h2 {
    margin: 0;
    font-size: 1.2em;
    border: none;
}
.close-btn {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #888;
}

.modal-body {
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.drawing-preview-item {
    display: flex;
    align-items: center;
    gap: 15px;
    border: 1px solid #eee;
    padding: 10px;
    border-radius: 6px;
}
.drawing-preview-item canvas {
    width: 80px;
    height: auto;
    border: 1px solid #ccc;
    flex-shrink: 0;
}
.drawing-info {
    flex-grow: 1;
}
.drawing-info strong {
    display: block;
    margin-bottom: 5px;
}
.drawing-info span {
    font-size: 12px;
    color: #666;
}
.add-drawing-btn {
    background-color: #28a745;
    color: white;
    border: none;
    border-radius: 5px;
    padding: 8px 15px;
    cursor: pointer;
    font-weight: bold;
}
.add-drawing-btn:hover {
    background-color: #218838;
}

.przycisk-drive {
    background-color: #4285F4;
    position: relative;
    transition: all 0.3s ease;
    overflow: hidden;
}
.przycisk-drive .drive-btn-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    transition: opacity 0.3s ease;
}
.przycisk-drive.loading .drive-btn-content {
    opacity: 0.5;
}
.przycisk-drive.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin-top: -10px;
    margin-left: -10px;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* --- NOWE STYLE DLA KONTENERA LINKU (LOKEN) --- */
#loken-gdrive-link-box {
    margin-top: 15px;
    display: none;
}
#loken-gdrive-link-box.visible {
    display: block;
}


/* === NOWE STYLE DLA SEKCJI GENERAL INFO (REFAKTORYZACJA) === */
.gi-header-wrapper {
    display: flex;
    align-items: center;
    gap: 0;
}

.gi-header-wrapper .accordion {
    flex-grow: 1;
    border-right: none;
}

.reset-btn-header {
    height: 43px;
    width: 45px;
    border: none;
    background-color: #f1f1f1;
    border-bottom: 1px solid #ddd;
    cursor: pointer;
    font-size: 18px;
    color: #444;
    transition: background-color 0.2s;
}
.reset-btn-header:hover {
    background-color: #e2e2e2;
}

#gi-primary-container, #gi-secondary-container {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 15px 0;
}

.gi-accordion-wrapper {
    border-bottom: 1px solid #e9ecef;
}
.gi-accordion-wrapper:last-child {
    border-bottom: none;
}

.accordion.gi-accordion {
    padding: 8px 12px;
    font-size: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #f8f9fa;
    border: none;
    border-bottom: none;
}
.accordion.gi-accordion:hover, .accordion.gi-accordion.active {
    background-color: #e9ecef;
}

.gi-accordion-label {
    font-weight: 600;
    color: #343a40;
    flex-shrink: 0;
    margin-right: 10px;
}

.gi-accordion-value {
    font-weight: normal;
    color: #0056b3;
    text-align: right;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.panel.gi-panel {
    padding: 0;
    background-color: #fff;
    border-top: 1px solid #dee2e6;
    border-left: none;
    border-right: none;
}

.gi-panel-content {
    padding: 10px 15px;
}


.gi-option {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}
.gi-option:last-child {
    margin-bottom: 0;
}
.gi-option label {
    margin: 0;
    font-weight: normal;
    margin-left: 8px;
}
.gi-option input[type="radio"],
.gi-option input[type="checkbox"] {
    flex-shrink: 0;
}
.gi-custom-input {
    margin-left: 5px;
    padding: 4px 6px;
    font-size: 13px;
    flex-grow: 1;
}
/* --- NOWE STYLE DLA PRZEWIJANEGO PANELU TILLEGG --- */
.scrollable-options {
    max-height: 280px;
    overflow-y: auto;
    padding-right: 15px;
    margin-right: -10px;
}

/* === NOWE STYLE DLA ZAKŁADKI LAGREDE TILBUD === */
#saved-offers-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background-color: #fff;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}
#offer-filter-buttons {
    display: flex;
    gap: 10px;
}
.offer-filter-btn {
    padding: 8px 20px;
    font-size: 14px;
    font-weight: 600;
    border: 1px solid #ccc;
    background-color: #f8f9fa;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}
.offer-filter-btn:hover {
    background-color: #e9ecef;
}
.offer-filter-btn.active {
    background-color: #007bff;
    color: white;
    border-color: #007bff;
}
#offer-search-container {
    position: relative;
    display: flex;
    align-items: center;
}
#offer-search-container i {
    position: absolute;
    left: 12px;
    font-size: 18px;
    color: #6c757d;
    pointer-events: none;
}
#offer-search-input {
    width: 350px;
    padding: 8px 12px 8px 40px; /* Padding dla ikony */
    border-radius: 6px;
    border: 1px solid #ccc;
    font-size: 14px;
}

#top-action-buttons {
    margin-bottom: 0;
    flex-wrap: wrap;
}
#top-action-buttons button {
    flex-grow: 1;
    flex-basis: 48%;
    padding: 8px;
    font-size: 0.9em;
    min-height: 40px;
}

/* === NOWE STYLE: LØKEN RIBBON BAR === */
#loken-ribbon-bar {
    display: flex;
    align-items: flex-start;
    background-color: #f8f9fa;
    padding: 8px 10px 8px 15px;
    border-bottom: 1px solid #e0e0e0;
    width: 100%;
    box-sizing: border-box;
    flex-shrink: 0;
    order: -1;
    transition: padding 0.3s ease;
}

#ribbon-content-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 15px; /* Zwiększony odstęp między grupami */
    flex-grow: 1;
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.2s ease, padding 0.3s ease;
    max-height: 100px;
    opacity: 1;
}

#ribbon-toggle-btn {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #ccc;
    border-radius: 4px;
    background-color: #fff;
    cursor: pointer;
    margin-left: 10px;
    flex-shrink: 0;
    align-self: center;
}
#ribbon-toggle-btn:hover {
    background-color: #e9ecef;
}
#ribbon-toggle-btn i {
    font-size: 16px;
    transition: transform 0.3s ease;
}

/* Stan zwinięty */
#loken-ribbon-bar.collapsed {
    padding-top: 4px;
    padding-bottom: 4px;
}
#loken-ribbon-bar.collapsed #ribbon-content-wrapper {
    max-height: 0;
    opacity: 0;
}
#loken-ribbon-bar.collapsed #ribbon-toggle-btn i {
    transform: rotate(180deg);
}


.ribbon-group {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 10px;
    border: 1px solid transparent;
    border-radius: 4px;
}

.ribbon-group-title {
    font-size: 11px;
    font-weight: 600;
    color: #6c757d;
    text-transform: uppercase;
    margin-right: 10px;
    border-bottom: 2px solid #007bff;
    padding-bottom: 2px;
}

.ribbon-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start; /* Wyrównanie do lewej */
    gap: 4px;
}

.ribbon-item label {
    font-size: 12px;
    font-weight: 500;
    color: #343a40;
    margin: 0;
}

.ribbon-color-picker {
    width: 60px; /* Większy podgląd */
    height: 28px;
    border: 1px solid #ccc;
    border-radius: 4px;
    cursor: pointer;
    padding: 1px;
    background-color: #fff;
}
.ribbon-color-picker:disabled {
    cursor: not-allowed;
}

.ribbon-color-picker::-webkit-color-swatch-wrapper {
    padding: 0;
}
.ribbon-color-picker::-webkit-color-swatch {
    border: none;
    border-radius: 3px;
}

.ribbon-text-search {
    width: 150px;
    padding: 4px 8px;
    font-size: 13px;
    border: 1px solid #ccc;
    border-radius: 4px;
    height: 28px;
    box-sizing: border-box;
}