/**
 * Floating CTA Block Styles
 *
 * @package LiquidationSpa
 */

.lspa-floating-cta {
    position: relative;
    z-index: 100;
}

.lspa-floating-cta__inner {
    background-color: #FFFFFF;
    border: 1px solid #E5E5E5;
    border-radius: 1rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 300ms ease;
}

.lspa-floating-cta__container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 1.25rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

/* Social Proof */
.lspa-floating-cta__social {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
}

/* Overlapping Avatars */
.lspa-floating-cta__avatars {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.lspa-floating-cta__avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid #FFFFFF;
    flex-shrink: 0;
    margin-left: -12px;
    position: relative;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.lspa-floating-cta__avatar:first-child {
    margin-left: 0;
}

.lspa-floating-cta__avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.lspa-floating-cta__social-content {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.lspa-floating-cta__social-text {
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    font-weight: 600;
    color: #012951;
}

.lspa-floating-cta__stars {
    display: flex;
    gap: 2px;
}

.lspa-floating-cta__star {
    width: 16px;
    height: 16px;
    color: #F59E0B;
}

/* Content */
.lspa-floating-cta__content {
    flex: 1;
    text-align: center;
    min-width: 0;
}

.lspa-floating-cta__title {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: #012951;
    margin: 0 0 0.25rem 0;
    line-height: 1.3;
}

.lspa-floating-cta__subtitle {
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    color: #525252;
    margin: 0;
}

/* CTA Button */
.lspa-floating-cta__action {
    flex-shrink: 0;
}

.lspa-floating-cta__button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 1.75rem;
    background-color: #012951;
    color: #FFFFFF;
    font-family: 'Inter', sans-serif;
    font-size: 0.9375rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 0.5rem;
    border: 2px solid #012951;
    transition: all 200ms ease;
    white-space: nowrap;
}

.lspa-floating-cta__button:hover {
    background-color: #FFFFFF;
    color: #012951;
}

.lspa-floating-cta__button-icon {
    width: 18px;
    height: 18px;
    transition: transform 200ms ease;
}

.lspa-floating-cta__button:hover .lspa-floating-cta__button-icon {
    transform: translateX(4px);
}

/* Close Button (hidden by default) */
.lspa-floating-cta__close {
    display: none;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    background: transparent;
    border: 1px solid #E5E5E5;
    border-radius: 50%;
    cursor: pointer;
    color: #525252;
    transition: all 200ms ease;
    flex-shrink: 0;
}

.lspa-floating-cta__close:hover {
    background-color: #F5F5F5;
    color: #012951;
}

.lspa-floating-cta__close-icon {
    width: 18px;
    height: 18px;
}

/* Sticky State */
.lspa-floating-cta.is-sticky {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 0 1rem 1rem;
    animation: lspa-slide-up 300ms ease forwards;
}

.lspa-floating-cta.is-sticky .lspa-floating-cta__inner {
    border-radius: 1rem;
    box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.15);
}

.lspa-floating-cta.is-sticky .lspa-floating-cta__close {
    display: flex;
}

/* Hidden state (when user closes it) */
.lspa-floating-cta.is-hidden {
    transform: translateY(100%);
    opacity: 0;
    pointer-events: none;
}

@keyframes lspa-slide-up {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Placeholder for original position */
.lspa-floating-cta__placeholder {
    display: none;
}

.lspa-floating-cta.is-sticky + .lspa-floating-cta__placeholder,
.lspa-floating-cta.is-sticky ~ .lspa-floating-cta__placeholder {
    display: block;
}

/* Responsive */
@media (max-width: 1024px) {
    .lspa-floating-cta__container {
        padding: 1rem 1.5rem;
        gap: 1.5rem;
    }

    .lspa-floating-cta__title {
        font-size: 1.125rem;
    }

    .lspa-floating-cta__button {
        padding: 0.875rem 1.5rem;
    }
}

@media (max-width: 768px) {
    .lspa-floating-cta__container {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
        padding: 1.25rem;
    }

    .lspa-floating-cta__social {
        order: 1;
        width: 100%;
        justify-content: center;
    }

    .lspa-floating-cta__content {
        order: 2;
        width: 100%;
    }

    .lspa-floating-cta__action {
        order: 3;
        width: 100%;
    }

    .lspa-floating-cta__button {
        width: 100%;
        justify-content: center;
    }

    .lspa-floating-cta__close {
        position: absolute;
        top: 0.75rem;
        right: 0.75rem;
    }

    /* Sticky mobile */
    .lspa-floating-cta.is-sticky .lspa-floating-cta__container {
        flex-direction: row;
        flex-wrap: nowrap;
        gap: 1rem;
    }

    .lspa-floating-cta.is-sticky .lspa-floating-cta__social {
        display: none;
    }

    .lspa-floating-cta.is-sticky .lspa-floating-cta__content {
        width: auto;
        flex: 1;
        text-align: left;
    }

    .lspa-floating-cta.is-sticky .lspa-floating-cta__title {
        font-size: 1rem;
        margin-bottom: 0;
    }

    .lspa-floating-cta.is-sticky .lspa-floating-cta__subtitle {
        display: none;
    }

    .lspa-floating-cta.is-sticky .lspa-floating-cta__action {
        width: auto;
    }

    .lspa-floating-cta.is-sticky .lspa-floating-cta__button {
        width: auto;
        padding: 0.75rem 1.25rem;
        font-size: 0.875rem;
    }

    .lspa-floating-cta.is-sticky .lspa-floating-cta__close {
        position: static;
        width: 32px;
        height: 32px;
    }
}

/* In-page state (non-sticky) - add some margin */
.lspa-floating-cta:not(.is-sticky) {
    max-width: 1280px;
    margin: 3rem auto;
    padding: 0 1.5rem;
}

/* Editor Preview */
.editor-styles-wrapper .lspa-floating-cta {
    margin: 1rem 0;
}

.editor-styles-wrapper .lspa-floating-cta__close {
    display: none !important;
}
