/**
* Module mod_sj_sticky_any_module For Joomla 6
* Version		: 2.0.1
* Created by	: ExtensionSpot
* Modified on : 03 Nov 2025
* URL			: www.extensionspot.com
* Copyright (C) 2011-2025 ExtensionSpot
* License GPLv2.0 - http://www.gnu.org/licenses/gpl-2.0.html
*/

/* --- 1. --- */
.sj-sticky-any-module-wrapper {
    position: fixed;
    z-index: 50000;
    overflow: visible;
}

/* --- 2.  --- */
.sj-sticky-glisiera {
    display: flex;
    transition: transform 0.5s ease-in-out, margin 0.5s ease-in-out;
}

/* --- 3. --- */
.sj-sticky-panel {
    background-color: var(--panel-bg-color);
	color: var(--panel-text-color);
    padding: var(--panel-padding);
	border-radius: var(--flip-panel-border-radius);
    overflow: hidden; 

}

.sj-sticky-content-wrapper {
    overflow-y: auto; 
    overflow-x: hidden;
}
.sj-sticky-content {
    white-space: normal;
}

/* --- 4. --- */
.sj-sticky-flip {
    background-color: var(--flip-bg-color);
    border-radius: var(--flip-border-radius);
    padding: 10px; 
    width: auto; 
    cursor: pointer;
    display: flex; 
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s, color 0.3s;
    flex-shrink: 0; 
}
.sj-sticky-flip:hover {
    background-color: var(--flip-bg-hover-color);
}

.sj-sticky-toggler-icon {
    color: var(--flip-text-color);
    font-size: var(--flip-font-size, 14px);
    transition: color 0.3s, transform 0.5s ease-in-out;
    line-height: 1; 
}
.sj-sticky-toggler-text {
    color: var(--flip-text-color);
    font-size: var(--flip-font-size, 14px);
    padding-left: 8px; 
    white-space: nowrap;
    transition: color 0.3s;
	margin: 0;
}
.sj-sticky-flip:hover .sj-sticky-toggler-icon,
.sj-sticky-flip:hover .sj-sticky-toggler-text {
    color: var(--flip-text-hover-color);
}

/* --- 5.  --- */
.sj-sticky-close-wrapper { 
    display: none; 
    height: auto;
}
.sj-sticky-close { 
    padding: 5px; 
    cursor: pointer; 
    line-height: 1;
}

.sj-sticky-destroyer-icon {
    font-size: 1.5rem; 
    color: #333; 
    transition: color 0.3s;
}

.sj-sticky-close:hover .sj-sticky-destroyer-icon {
    color: #ff0000; 
}
.is-hidden-permanently { 
    display: none !important; 
}

/* --- 6. --- */

/* Layout Desktop: right handle */
.sj-layout-right .sj-sticky-glisiera { flex-direction: row; }
.sj-layout-right .sj-sticky-panel { order: 1; }
.sj-layout-right .sj-sticky-flip  { order: 2; }
.sj-layout-right .sj-sticky-flip {
    width: 44px; height: 44px; padding: 0;
}
.sj-layout-right .sj-sticky-toggler-text { display: none; }

.sj-layout-right .sj-sticky-glisiera.is-closed-desktop,
.sj-layout-right.sj-start-closed-desktop .sj-sticky-glisiera {
    transform: translateX(-100%);
    margin-left: 44px; 
}

/* Layout Desktop: left handle */
.sj-layout-left .sj-sticky-glisiera { flex-direction: row-reverse; }
.sj-layout-left .sj-sticky-panel { order: 1; }
.sj-layout-left .sj-sticky-flip  { order: 2; }
.sj-layout-left .sj-sticky-flip {
    width: 44px; height: 44px; padding: 0;
}
.sj-layout-left .sj-sticky-toggler-text { display: none; }

.sj-layout-left .sj-sticky-glisiera.is-closed-desktop,
.sj-layout-left.sj-start-closed-desktop .sj-sticky-glisiera {
    transform: translateX(100%);
    margin-right: 44px;
}

/* Layout Desktop: top handle */
.sj-layout-top .sj-sticky-glisiera { flex-direction: column; }
.sj-layout-top .sj-sticky-panel { order: 2; transform: none; }
.sj-layout-top .sj-sticky-flip  { order: 1; }


.sj-layout-top .sj-sticky-content-wrapper {
    transition: max-height 0.5s ease-in-out;
    max-height: 90vh; 
}
.sj-layout-top .sj-sticky-glisiera.is-closed-desktop .sj-sticky-content-wrapper,
.sj-layout-top.sj-start-closed-desktop .sj-sticky-glisiera .sj-sticky-content-wrapper {
    max-height: 0; 
}


.sj-layout-top .sj-sticky-panel {
    transition: padding-top 0.5s ease-in-out, padding-bottom 0.5s ease-in-out;
}
.sj-layout-top .sj-sticky-glisiera.is-closed-desktop .sj-sticky-panel,
.sj-layout-top.sj-start-closed-desktop .sj-sticky-glisiera .sj-sticky-panel {
    padding-top: 0;
    padding-bottom: 0;
}


.sj-sticky-glisiera.is-closed-desktop .sj-sticky-toggler-icon[class*="icon-arrow"],
.sj-sticky-glisiera.is-closed-desktop .sj-sticky-toggler-icon[class*="icon-chevron"],
.sj-sticky-glisiera.is-closed-mobile .sj-sticky-toggler-icon[class*="icon-arrow"],
.sj-sticky-glisiera.is-closed-mobile .sj-sticky-toggler-icon[class*="icon-chevron"] {
    transform: rotate(180deg);
}
