/* Menu Tabs Widget Styles */
.menu-tabs-widget {
    --menu-background: #fff;
    --menu-text-color: #333;
    --menu-hover-color: var(--e-global-color-accent);
    --menu-active-color: var(--e-global-color-accent);
    --menu-border-color: #eee;
    --menu-transition: 0.3s ease;
    
    font-family: inherit;
    position: relative;
    width: 100%;
    background-color: var(--menu-background);
}

/* Desktop Mode */
.menu-tabs-widget[data-display-mode="desktop"] {
    /* Desktop styles */
}

.menu-tabs-widget[data-display-mode="desktop"] .mobile-menu-toggle,
.menu-tabs-widget[data-display-mode="desktop"] .mobile-panels {
    display: none;
}

.menu-tabs-widget[data-display-mode="desktop"] .menu-tabs-columns {
    display: grid;
    grid-template-columns: 30% 30% 30%;
    gap: 0;
}

/* ... reszta stylów desktopowych ... */

/* Hamburger Menu Mode */
.menu-tabs-widget[data-display-mode="hamburger"] .menu-tabs-columns {
    display: none;
}

.menu-tabs-widget[data-display-mode="hamburger"] .mobile-menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    cursor: pointer;
    position: relative;
}

.menu-tabs-widget[data-display-mode="hamburger"] .hamburger {
    width: 30px;
    height: 3px;
    background: var(--menu-text-color);
    position: relative;
    transition: all 0.3s ease;
}

.menu-tabs-widget[data-display-mode="hamburger"] .hamburger:before,
.menu-tabs-widget[data-display-mode="hamburger"] .hamburger:after {
    content: '';
    position: absolute;
    width: 30px;
    height: 3px;
    background: var(--menu-text-color);
    left: 0;
    transition: all 0.3s ease;
}

.menu-tabs-widget[data-display-mode="hamburger"] .hamburger:before {
    top: -8px;
}

.menu-tabs-widget[data-display-mode="hamburger"] .hamburger:after {
    bottom: -8px;
}

/* Mobile Panels */
.menu-tabs-widget[data-display-mode="hamburger"] .mobile-panels {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.menu-tabs-widget[data-display-mode="hamburger"] .mobile-panels.active {
    display: flex;
    opacity: 1;
    visibility: visible;
}

.menu-tabs-widget[data-display-mode="hamburger"] .mobile-panel {
    position: absolute;
    top: 0;
    right: 0;
z-index: 99999;
    width: var(--panel-width, 90%);
    max-width: 400px;
    height: 100%;
    background: var(--menu-background);
    transform: translateX(100%);
    transition: transform var(--animation-speed, 0.3s) ease;
    overflow: hidden;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
}

.menu-tabs-widget[data-display-mode="hamburger"] .mobile-panel.slide-left {
    transform: translateX(0);
}

/* Panel Headers */
.menu-tabs-widget[data-display-mode="hamburger"] .panel-header {
    display: flex;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid var(--menu-border-color);
    background: #f8f8f8;
    position: sticky;
    top: 0;
    z-index: 2;
}

.menu-tabs-widget[data-display-mode="hamburger"] .panel-title {
    flex: 1;
    text-align: center;
    font-weight: 500;
    font-size: 18px;
    margin: 0 40px;
}

.menu-tabs-widget[data-display-mode="hamburger"] .back-to-tabs,
.menu-tabs-widget[data-display-mode="hamburger"] .back-to-submenu,
.menu-tabs-widget[data-display-mode="hamburger"] .close-panel {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--menu-text-color);
    transition: all 0.3s ease;
}

/* Panel Content */
.menu-tabs-widget[data-display-mode="hamburger"] .panel-content {
    height: calc(100vh - 71px);
    overflow-y: auto;
    padding: 20px;
}

/* Mobile Menu Items */
.menu-tabs-widget[data-display-mode="hamburger"] .mobile-tab-item,
.menu-tabs-widget[data-display-mode="hamburger"] .mobile-submenu-item,
.menu-tabs-widget[data-display-mode="hamburger"] .mobile-third-level-item {
    display: flex;
    align-items: center;
    padding: 15px 0;
    color: var(--menu-text-color);
    text-decoration: none;
    border-bottom: 1px solid var(--menu-border-color);
    transition: all 0.3s ease;
    cursor: pointer;
}

.menu-tabs-widget[data-display-mode="hamburger"] .mobile-tab-item:hover,
.menu-tabs-widget[data-display-mode="hamburger"] .mobile-submenu-item:hover,
.menu-tabs-widget[data-display-mode="hamburger"] .mobile-third-level-item:hover {
    color: var(--menu-hover-color);
}

.menu-tabs-widget[data-display-mode="hamburger"] .mobile-tab-item .chevron-right,
.menu-tabs-widget[data-display-mode="hamburger"] .mobile-submenu-item .chevron-right {
    margin-left: auto;
    font-size: 20px;
    opacity: 0.5;
    transition: all 0.3s ease;
}

.menu-tabs-widget[data-display-mode="hamburger"] .mobile-tab-item:hover .chevron-right,
.menu-tabs-widget[data-display-mode="hamburger"] .mobile-submenu-item:hover .chevron-right {
    opacity: 1;
    transform: translateX(3px);
}

/* Submenu and Third Level Panels */
.menu-tabs-widget[data-display-mode="hamburger"] .submenu-panel,
.menu-tabs-widget[data-display-mode="hamburger"] .third-level-panel {
    display: none;
}

.menu-tabs-widget[data-display-mode="hamburger"] .submenu-panel.active,
.menu-tabs-widget[data-display-mode="hamburger"] .third-level-panel.active {
    display: block;
}

.menu-tabs-widget[data-display-mode="hamburger"] .main-tab-link,
.menu-tabs-widget[data-display-mode="hamburger"] .main-submenu-link {
    font-weight: 700;
    font-size: 1.1em;
    padding: 15px 0;
    margin: -20px -20px 20px;
    background: #f8f8f8;
    padding: 15px 20px;
    border-bottom: 1px solid var(--menu-border-color);
}

/* Prevent body scroll when menu is open */
body.mobile-menu-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
}

/* Panel Position Variants */
.menu-tabs-widget[data-panel-position="left"] .mobile-panel {
    left: 0;
    right: auto;
    transform: translateX(-100%);
}

.menu-tabs-widget[data-panel-position="right"] .mobile-panel {
    right: 0;
    left: auto;
    transform: translateX(100%);
}

/* Animation Speed Variants */
.menu-tabs-widget[data-animation-speed="fast"] .mobile-panel {
    transition-duration: 0.2s;
}

.menu-tabs-widget[data-animation-speed="slow"] .mobile-panel {
    transition-duration: 0.5s;
}

/* Panel Width Variants */
.menu-tabs-widget[data-panel-width="full"] .mobile-panel {
    max-width: 100%;
}

.menu-tabs-widget[data-panel-width="narrow"] .mobile-panel {
    max-width: 300px;
}

/* Scrollbar Styling */
.menu-tabs-widget[data-display-mode="hamburger"] .panel-content::-webkit-scrollbar {
    width: 6px;
}

.menu-tabs-widget[data-display-mode="hamburger"] .panel-content::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.menu-tabs-widget[data-display-mode="hamburger"] .panel-content::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px;
}

.menu-tabs-widget[data-display-mode="hamburger"] .panel-content::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Desktop Layout */
.menu-tabs-columns {
    display: flex;
    width: 100%;
    background: #fff;
    border-radius: 0px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* Tabs List */
.tabs-list {
    padding: 20px 0;
    background: #ffffff;
    border-right: 1px solid #eee;
    overflow-y: auto;
    min-width: 0;
}

.tab-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: #333;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    border-bottom: 1px solid #eee;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tab-item:last-child {
    border-bottom: none;
}

.tab-item:hover,
.tab-item.active {
    background: #fff;
    color: #000;
}

.tab-item .chevron-right {
    margin-left: auto;
    font-size: 16px;
    color: #999;
    flex-shrink: 0;
}

/* Submenu Content */
.submenu-content {
    display: none;
    padding: 20px;
    background: #fff;
    border-right: 1px solid #eee;
    overflow-y: auto;
    min-width: 0;
    width: 100%;
}

.submenu-content.active {
    display: flex;
}

.submenu-items {
    display: none;
    width: 100%;
}

.submenu-items.active {
    display: block;
    width: 100%;
}

.submenu-item {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    color: #333;
    text-decoration: none;
    transition: all 0.3s ease;
    border-bottom: 1px solid #eee;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}

.submenu-item:last-child {
    border-bottom: none;
}

.submenu-item:hover {
    background: #f5f5f5;
    color: #000;
}

.submenu-item .chevron-right {
    margin-left: auto;
    font-size: 14px;
    color: #999;
    flex-shrink: 0;
}

/* Third Level Content */
.third-level-content {
    display: none;
    padding: 20px;
    background: #fff;
    overflow-y: auto;
    min-width: 0;
}

.third-level-content.active {
    display: block;
}

.third-level-items {
    display: none;
}

.third-level-items.active {
    display: block;
}

.third-level-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.third-level-item {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    color: #333;
    text-decoration: none;
    transition: all 0.3s ease;
    border-bottom: 1px solid #eee;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.third-level-item:last-child {
    border-bottom: none;
}

.third-level-item:hover {
    background: #f5f5f5;
    color: #000;
}

.short-menu .menu-tabs-widget{
	background-color: transparent;
}
.short-menu .menu-tabs-widget[data-display-mode="desktop"] .menu-tabs-columns{
	grid-template-columns: 100%;
	width: 30%;
	background-color: transparent;
}


/* Mobile Layout */
@media (max-width: 991px) {
    .menu-tabs-columns {
        display: none;
    }

    .mobile-menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        background-color: var(--menu-bg-color);
        border-radius: 4px;
        cursor: pointer;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    }

    .mobile-menu-toggle:hover {
        background-color: var(--menu-hover-color);
    }

    .mobile-panels {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 9999;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s ease;
    }

    .mobile-panels.active {
        opacity: 1;
        visibility: visible;
    }

    .mobile-panel {
        position: fixed;
        top: 0;
        right: 0;
        width: 90%;
        max-width: 400px;
        height: 100%;
        background-color: var(--menu-bg-color);
        box-shadow: -2px 0 8px rgba(0, 0, 0, 0.1);
        transform: translateX(100%);
        transition: transform 0.3s ease;
        z-index: 10000;
    }

    .mobile-panel.slide-left {
        transform: translateX(0);
    }

    .mobile-panel-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 15px;
        background-color: var(--menu-bg-color);
        border-bottom: 1px solid var(--menu-border-color);
    }

    .mobile-panel-title {
        margin: 0;
        font-size: 18px;
        font-weight: 600;
    }

    .back-button,
    .close-panel {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        background: none;
        border: none;
        cursor: pointer;
        color: var(--menu-text-color);
    }

    .back-button:hover,
    .close-panel:hover {
        color: var(--menu-hover-color);
    }

    .mobile-panel-content {
        height: calc(100% - 71px);
        overflow-y: auto;
        padding: 15px;
    }

    .mobile-tab-item,
    .mobile-submenu-item {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 12px 15px;
        color: var(--menu-text-color);
        text-decoration: none;
        border-bottom: 1px solid var(--menu-border-color);
        transition: background-color 0.3s ease;
    }

    .mobile-tab-item:hover,
    .mobile-submenu-item:hover {
        background-color: var(--menu-hover-color);
    }

    .mobile-tab-item.active,
    .mobile-submenu-item.active {
        background-color: var(--menu-active-color);
        color: #fff;
    }

    .mobile-tab-item .arrow,
    .mobile-submenu-item .arrow {
        width: 24px;
        height: 24px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .mobile-tab-item .arrow svg,
    .mobile-submenu-item .arrow svg {
        width: 16px;
        height: 16px;
        fill: currentColor;
    }

    /* Animacje */
    @keyframes slideIn {
        from {
            transform: translateX(100%);
        }
        to {
            transform: translateX(0);
        }
    }

    @keyframes slideOut {
        from {
            transform: translateX(0);
        }
        to {
            transform: translateX(100%);
        }
    }

    /* Style dla scrollbara */
    .mobile-panel-content::-webkit-scrollbar {
        width: 6px;
    }

    .mobile-panel-content::-webkit-scrollbar-track {
        background: var(--menu-bg-color);
    }

    .mobile-panel-content::-webkit-scrollbar-thumb {
        background: var(--menu-border-color);
        border-radius: 3px;
    }

    .mobile-panel-content::-webkit-scrollbar-thumb:hover {
        background: var(--menu-hover-color);
    }

    /* Blokada scrolla na body gdy menu jest otwarte */
    body.mobile-menu-open {
        overflow: hidden;
    }
}

.hamburger {
    display: block;
    width: 25px;
    height: 2px;
    background: #333;
    position: relative;
    transition: all 0.3s ease;
}

.hamburger:before,
.hamburger:after {
    content: '';
    position: absolute;
    width: 25px;
    height: 2px;
    background: #333;
    left: 0;
    transition: all 0.3s ease;
}

.hamburger:before {
    top: -8px;
}

.hamburger:after {
    bottom: -8px;
}

/* Mobile Panels */
.mobile-panels {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-panels.active {
    opacity: 1;
}

.mobile-panel {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    max-width: 400px;
    height: 100%;
    background: #fff;
    transition: right 0.3s ease;
    overflow: hidden;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
}

.mobile-panel.active {
    right: 0;
}

.panel-header {
    display: flex;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #eee;
    background: #f8f8f8;
}

.panel-title {
    margin: 0;
    font-size: 18px;
    font-weight: 500;
    flex-grow: 1;
    text-align: center;
}

.close-panel,
.back-to-tabs,
.back-to-submenu {
    background: none;
    border: none;
    font-size: 24px;
    color: #333;
    cursor: pointer;
    padding: 8px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    border-radius: 4px;
}

.close-panel:hover,
.back-to-tabs:hover,
.back-to-submenu:hover {
    background: #eee;
}

.panel-content {
    padding: 15px;
    overflow-y: auto;
    height: calc(100% - 71px);
}

/* Mobile Menu Items */
.mobile-tab-item,
.mobile-submenu-item,
.mobile-third-level-item {
    display: flex;
    align-items: center;
    padding: 15px;
    color: #333;
    text-decoration: none;
    border-bottom: 1px solid #eee;
    transition: all 0.3s ease;
    cursor: pointer;
}

.mobile-tab-item:hover,
.mobile-submenu-item:hover,
.mobile-third-level-item:hover {
    background: #f5f5f5;
}

.mobile-tab-item.direct-link,
.mobile-submenu-item:not(.with-children) {
    color: #333;
}

.mobile-tab-item .chevron-right,
.mobile-submenu-item .chevron-right {
    margin-left: auto;
    font-size: 18px;
    color: #999;
}

/* Submenu Panel */
.submenu-panel,
.third-level-panel {
    display: none;
}

.submenu-panel.active,
.third-level-panel.active {
    display: block;
}

.main-tab-link,
.main-submenu-link {
    background: #f8f8f8;
    margin: -15px -15px 15px;
    border-bottom: 1px solid #eee;
}

/* Animacje */
.mobile-panel {
    animation-duration: 0.3s;
    animation-fill-mode: both;
}

.mobile-panel.slide-in {
    animation-name: slideIn;
}

.mobile-panel.slide-out {
    animation-name: slideOut;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(0);
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(100%);
    }
}

/* Scrollbar styles */
.panel-content::-webkit-scrollbar {
    width: 6px;
}

.panel-content::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.panel-content::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px;
}

.panel-content::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Prevent body scroll when menu is open */
body.mobile-menu-open {
    overflow: hidden;
}

/* Responsive Adjustments */
@media (max-width: 1200px) {
    .menu-tabs-columns {
        flex-wrap: wrap;
    }

    .tabs-list,
    .submenu-content,
    .third-level-content {
        flex: 0 0 100% !important;
    }
}

@media (max-width: 768px) {
    .third-level-list {
        display: flex;
        flex-direction: column;
    }
}

/* Hover Mode */
.menu-tabs-widget[data-hover-mode="true"] .tab-item:hover {
    background: #fff;
}

/* Panel Position */
.menu-tabs-widget[data-panel-position="right"] .mobile-panel {
    transform: translateX(100%);
}

.menu-tabs-widget[data-panel-position="right"] .mobile-panel.active {
    transform: translateX(0);
}

/* Panel Width */
.menu-tabs-widget[data-panel-width="full"] .mobile-panel {
    width: 100%;
}

.menu-tabs-widget[data-panel-width="partial"] .mobile-panel {
    width: 80%;
}

/* Animation Speed */
.menu-tabs-widget[data-animation-speed="fast"] .mobile-panel {
    transition-duration: 0.2s;
}

.menu-tabs-widget[data-animation-speed="slow"] .mobile-panel {
    transition-duration: 0.5s;
} 