.ssp-container {
    position: fixed;
    top: 50%;
    transform: translateY(-30%);
    display: flex;
    flex-direction: column;
    z-index: 9999;
}

.ssp-position-right {
    right: 0;
}

.ssp-position-left {
    left: 0;
}

.ssp-button {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 35px;
    height: 35px;
    margin: 4px 0;
    text-decoration: none;
    font-size: 5px;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    overflow: hidden;
    will-change: width;
}

/* Adjust border-radius based on position */
.ssp-position-right .ssp-button {
    border-radius: 6px 0 0 6px;
}
.ssp-position-left .ssp-button {
     border-radius: 0 6px 6px 0;
}

/* On hover, increase button width */
.ssp-position-right .ssp-button:hover {
    width: 150px;
}
.ssp-position-left .ssp-button:hover {
    width: 150px;
}

/* Styles for the image inside the button */
.ssp-button-image {
    width: 25px;
    height: 25px;
    object-fit: contain;
    position: relative;
    z-index: 2;
}

/* Styles for the button name (the sliding part) */
.ssp-button-name {
    position: absolute;
    top: 0;
    width: calc(150px - 45px);
    height: 100%;
    display: flex;
    align-items: center;
    padding: 0 10px;
    font-size: 14px;
    white-space: nowrap;
    transition: all 0.3s ease;
    background: inherit;
    direction: rtl;
    opacity: 0;
    visibility: hidden;
}

.ssp-button:hover .ssp-button-name {
    opacity: 1;
    visibility: visible;
    transition-delay: 0.1s;
}

/* Position the name text for right-side buttons */
.ssp-position-right .ssp-button-name {
    right: 45px; /* Text is positioned to the left of the icon */
    text-align: right; /* Align text to the right for RTL */
    transform: translateX(100%); /* Hidden position: pushed out to the right */
}
.ssp-position-right .ssp-button:hover .ssp-button-name {
    transform: translateX(0); /* Visible position: slides in to the left */
}

/* Position the name text for left-side buttons */
.ssp-position-left .ssp-button-name {
    left: 45px; /* Text is positioned to the right of the icon */
    text-align: left; /* Align text to the left for RTL */
    transform: translateX(-100%); /* Hidden position: pushed out to the left */
}
.ssp-position-left .ssp-button:hover .ssp-button-name {
    transform: translateX(0); /* Visible position: slides in to the right */
}

/* New CSS for disabling hover animation on mobile */
@media (max-width: 768px) {
    .ssp-button {
        transition: none;
    }
    .ssp-button-name {
        display: none;
    }
}


/* Styles for shortcode */
.ssp-shortcode-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.ssp-shortcode-button {
    border-radius: 6px;
}