/**
 * KB Live Sales Popup
 * Frontend popup styles
 */

/* Container positioning */
.kblsp-container {
    position: fixed;
    z-index: 9999;
    max-width: 100%;
    pointer-events: none;
}

.kblsp-container.kblsp-bottom-right {
    bottom: 20px;
    right: 20px;
}

.kblsp-container.kblsp-bottom-left {
    bottom: 20px;
    left: 20px;
}

.kblsp-container.kblsp-top-right {
    top: 20px;
    right: 20px;
}

.kblsp-container.kblsp-top-left {
    top: 20px;
    left: 20px;
}

/* Wrapper for clickable popup */
.kblsp-wrapper {
    display: block;
    text-decoration: none;
    color: inherit;
    pointer-events: auto;
}

.kblsp-wrapper:hover {
    text-decoration: none;
}

/* Main popup */
.kblsp-popup {
    display: none;
    align-items: center;
    padding: 10px 15px;
    border: 1px solid #333;
    background: #333;
    color: #fff;
    position: relative;
    cursor: pointer;
    transition: opacity 0.3s ease;
    pointer-events: auto;
}

.kblsp-popup.sticky {
    cursor: default;
}

/* Buttons container */
.kblsp-buttons {
    position: absolute;
    top: 5px;
    right: 5px;
    display: flex;
    gap: 5px;
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 10;
}

.kblsp-popup:hover .kblsp-buttons,
.kblsp-buttons.permanent {
    opacity: 1;
}

.kblsp-close-btn,
.kblsp-sticky-btn {
    background: rgba(0, 0, 0, 0.5);
    border: none;
    color: #ffc107;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: background 0.2s ease;
}

.kblsp-close-btn:hover,
.kblsp-sticky-btn:hover {
    background: rgba(0, 0, 0, 0.8);
}

.kblsp-sticky-btn {
    width: auto;
    padding: 0 8px;
    font-size: 11px;
    border-radius: 12px;
}

.kblsp-sticky-btn.active {
    background: rgba(255, 193, 7, 0.3);
}

/* Image */
.kblsp-image {
    flex-shrink: 0;
    margin-right: 12px;
}

.kblsp-image img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    transition: transform 0.3s ease;
}

.kblsp-image:hover img {
    transform: scale(1.05);
}

.kblsp-image a {
    display: block;
}

/* Content */
.kblsp-content {
    flex: 1;
    font-size: 13px;
    line-height: 1.4;
    word-break: break-word;
}

.kblsp-content strong {
    font-weight: 700;
}

.kblsp-content small {
    font-size: 11px;
    opacity: 0.8;
}

.kblsp-product-link {
    text-decoration: none;
    font-weight: 600;
}

.kblsp-product-link:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 576px) {
    .kblsp-container {
        left: 10px !important;
        right: 10px !important;
        bottom: 10px !important;
        top: auto !important;
    }

    .kblsp-popup {
        width: 100% !important;
        max-width: 100%;
    }

    .kblsp-image img {
        width: 50px;
        height: 50px;
    }

    .kblsp-content {
        font-size: 12px;
    }
}

/* Animation overrides */
.kblsp-popup.animate__animated {
    animation-duration: 0.6s;
}
