/**
 * Smart Search Helper Styles
 * - Floating search button
 * - Exit-intent modal
 */

/* =====================================================
   FLOATING SEARCH BUTTON
   ===================================================== */

.floating-search-btn {
    position: fixed;
    bottom: 30px;
    right: 120px;
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    padding: 16px 24px;
    border-radius: 50px;
    box-shadow: 0 4px 20px rgba(0, 123, 255, 0.4);
    cursor: pointer;
    z-index: 9997;
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 350px;
    opacity: 0;
    transform: translateY(20px) scale(0.9);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.floating-search-btn.show {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.floating-search-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 6px 30px rgba(0, 123, 255, 0.5);
}

.floating-search-content {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.floating-search-content i {
    font-size: 1.5rem;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.floating-search-content span {
    font-weight: 600;
    font-size: 1rem;
    white-space: nowrap;
}

.floating-search-close {
    background: rgba(255, 255, 255, 0.25);
    border: 2px solid rgba(255, 255, 255, 0.4);
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    transition: all 0.2s;
    padding: 0;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.floating-search-close:hover {
    background: rgba(255, 255, 255, 0.4);
    border-color: rgba(255, 255, 255, 0.6);
    transform: rotate(90deg) scale(1.05);
}

.floating-search-close i {
    font-size: 1rem;
    font-weight: bold;
}

/* Mobile optimizations */
@media (max-width: 768px) {
    .floating-search-btn {
        bottom: 20px;
        right: 20px;
        left: 20px;
        max-width: none;
        justify-content: center;
    }

    .floating-search-content span {
        font-size: 0.9rem;
    }
}

/* =====================================================
   EXIT INTENT MODAL
   ===================================================== */

.exit-intent-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s;
    padding: 20px;
}

.exit-intent-overlay.show {
    opacity: 1;
}

.exit-intent-modal {
    background: white;
    border-radius: 16px;
    max-width: 500px;
    width: 100%;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.9) translateY(-20px);
    transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.exit-intent-overlay.show .exit-intent-modal {
    transform: scale(1) translateY(0);
}

.exit-intent-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: transparent;
    border: none;
    font-size: 2rem;
    color: #6c757d;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
    padding: 0;
    line-height: 1;
}

.exit-intent-close:hover {
    background: #f8f9fa;
    color: #343a40;
    transform: rotate(90deg);
}

.exit-intent-content {
    padding: 50px 40px 40px;
    text-align: center;
}

.exit-intent-icon {
    font-size: 4rem;
    color: #007bff;
    margin-bottom: 20px;
    display: block;
    animation: bounceIn 0.6s;
}

@keyframes bounceIn {
    0% { transform: scale(0); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.exit-intent-content h3 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #212529;
    margin-bottom: 15px;
}

.exit-intent-content p {
    font-size: 1.1rem;
    color: #6c757d;
    margin-bottom: 30px;
    line-height: 1.6;
}

.exit-intent-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.exit-intent-actions .btn {
    min-width: 150px;
    font-weight: 600;
}

/* Mobile optimizations */
@media (max-width: 576px) {
    .exit-intent-content {
        padding: 40px 25px 30px;
    }

    .exit-intent-icon {
        font-size: 3rem;
    }

    .exit-intent-content h3 {
        font-size: 1.4rem;
    }

    .exit-intent-content p {
        font-size: 1rem;
    }

    .exit-intent-actions {
        flex-direction: column;
    }

    .exit-intent-actions .btn {
        width: 100%;
    }
}

/* =====================================================
   ACCESSIBILITY
   ===================================================== */

/* Focus styles for keyboard navigation */
.floating-search-btn:focus-visible,
.floating-search-close:focus-visible,
.exit-intent-close:focus-visible {
    outline: 3px solid #007bff;
    outline-offset: 3px;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .floating-search-btn,
    .exit-intent-modal,
    .floating-search-content i {
        animation: none !important;
        transition: none !important;
    }
}

/* Dark mode styles are in resources/scss/components/_dark-mode.scss */
