/**
 * CloudGO CTA Social Sticky Widget Styles
 * File: cloudgo-cta-social-sticky.css
 */

/* Base Sticky Social Styles */
.sticky-social {
    position: fixed;
    right: 0;
    bottom: 80%;
    z-index: 1022;
    height: 0;
    transform: translateY(50%);
}

.sticky-social-left {
    right: auto;
    left: 0;
}

.sticky-social-right {
    right: 0;
    left: auto;
}

/* List Container */
.sticky-social .list {
    margin: auto;
    transition: ease all 300ms;
    background: #fff;
    box-shadow: 0 1px 4px 0 rgba(102, 98, 98, .4);
    padding: 9px;
    padding-top: 20px;
    padding-bottom: 20px;
    border-radius: 24px 0 0 24px;
    text-align: center;
}

/* Individual Items */
.sticky-social .list .item {
    margin-left: auto;
    height: 50px;
    width: 50px;
    transition: ease width 300ms;
    border-radius: 50%;
    margin-bottom: 7px;
    background: #1b74e4;
}

.sticky-social .list .item p {
    color: #676767;
}

.sticky-social-left .list .item {
    margin-left: 0;
    margin-right: auto;
}

/* Item Links */
.sticky-social .list .item a {
    font-size: 1.8rem;
    width: 100%;
    height: 100%;
    text-decoration: none;
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
}

.sticky-social .list .item a:hover {
    text-decoration: none;
    transform: scale(1.1);
}

.sticky-social .list .item a:focus {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

/* Toggle Button */
.sticky-social .toggle-social {
    position: absolute;
    margin-top: 0.25rem;
    right: 20px;
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 20px;
    background-color: #1b74e4;
    height: 30px;
    width: 30px;
    cursor: pointer;
    transition: ease all 300ms;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.sticky-social-left .toggle-social {
    right: auto;
    left: 20px;
}

.sticky-social .toggle-social:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

/* Hidden State */
.sticky-social.hidden .list {
    transition: ease all 300ms;
    transform: translateX(100%);
}

.sticky-social-left.hidden .list {
    transform: translateX(-100%);
}

.sticky-social.hidden .toggle-social {
    transition: ease all 300ms;
    transform: translateX(0.5rem);
}

.sticky-social-left.hidden .toggle-social {
    transform: translateX(-0.5rem);
}

.sticky-social.hidden .toggle-social i {
    transition: ease all 300ms;
    transform: rotateZ(180deg);
}

/* Social Media Colors */
.sticky-social .fb {
    background-color: #1b74e4;
    border-radius: 4px 4px 0 0;
}

.sticky-social .zalo {
    background-color: #1b74e4;
}

.sticky-social .yt {
    background-color: #1b74e4;
    border-radius: 0 0 4px 4px;
}

.sticky-social .ms {
    background-color: #1b74e4;
}

.sticky-social .zl {
    background-color: #1b74e4;
}

/* CTA Button Colors */
.sticky-social .dktv {
    background-color: #1b74e4;
    border-radius: 4px 4px 0 0;
}

.sticky-social .y-c-k-s {
    background-color: #1b74e4;
    border-radius: 0 0 4px 4px;
}

/* Text Styles */
.sticky-social .item p {
    font-size: 9.5px;
    line-height: 10px;
    color: #fff;
    margin: 0;
    padding: 0;
    text-align: center;
    font-weight: 500;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

/* Separator Line */
.sticky-social .item[style*="border-top"] {
    background: none !important;
    border-top: solid white 1px !important;
    border-radius: 0 !important;
    height: 3px !important;
    margin-bottom: 8px !important;
}

/* Spacing */
.sticky-social .first {
    margin-bottom: 15px;
}

.sticky-social .last {
    margin-bottom: 0;
}

/* Animation for Toggle */
.sticky-social .toggle-social i {
    transition: transform 0.3s ease;
}

/* Content Wrapper */
.sticky-social .content {
    padding-bottom: 30px;
    position: relative;
}

/* Responsive Design */
@media (max-width: 991.98px) {
    .sticky-social .list .item {
        height: 40px;
        width: 40px;
    }

    .sticky-social .list .item a {
        font-size: 1.5rem;
    }

    .sticky-social .toggle-social {
        right: 10px;
        height: 25px;
        width: 25px;
    }

    .sticky-social-left .toggle-social {
        left: 10px;
    }

    .sticky-social .item p {
        font-size: 8px;
        line-height: 9px;
    }
}

@media (max-width: 767.98px) {
    .sticky-social {
        bottom: 60%;
    }

    .sticky-social .list .item {
        height: 35px;
        width: 35px;
    }

    .sticky-social .list .item a {
        font-size: 1.3rem;
    }

    .sticky-social .toggle-social {
        height: 22px;
        width: 22px;
        right: 8px;
    }

    .sticky-social-left .toggle-social {
        left: 8px;
    }
}

/* Loading State */
.sticky-social.loading {
    opacity: 0.5;
    pointer-events: none;
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .sticky-social,
    .sticky-social .list,
    .sticky-social .toggle-social,
    .sticky-social .toggle-social i,
    .sticky-social .list .item a {
        transition: none;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .sticky-social .list .item a {
        border: 2px solid #fff;
    }

    .sticky-social .toggle-social {
        border: 2px solid #fff;
    }
}

/* Focus States */
.sticky-social .toggle-social:focus {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

/* Hover Effects */
.sticky-social .list .item:hover {
    transform: translateX(-3px);
}

.sticky-social-left .list .item:hover {
    transform: translateX(3px);
}

/* Print Styles */
@media print {
    .sticky-social {
        display: none !important;
    }
}

/* Custom Widget Sizes */
.sticky-social[data-item-size-desktop] .list .item {
    height: var(--item-size-desktop, 50px);
    width: var(--item-size-desktop, 50px);
}

.sticky-social[data-item-size-mobile] .list .item {
    height: var(--item-size-mobile, 40px);
    width: var(--item-size-mobile, 40px);
}

/* Z-index Management */
.sticky-social[style*="z-index"] {
    /* Ensure z-index is respected */
}

/* Error State */
.sticky-social .item.error {
    background-color: #dc3545 !important;
}

.sticky-social .item.error a {
    pointer-events: none;
    opacity: 0.5;
}

/* Success State */
.sticky-social .item.success {
    background-color: #28a745 !important;
}

/* Loading Animation */
@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

.sticky-social.loading .list .item {
    animation: pulse 1.5s infinite;
}

/* Widget Editor Preview */
.elementor-widget-cloudgo-cta-social-sticky .sticky-social {
    position: relative !important;
    right: auto !important;
    bottom: auto !important;
    z-index: auto !important;
    height: auto !important;
    transform: none !important;
    display: inline-block;
    margin: 20px;
}
