/**
 * FOXCO FOMO - Live Visitor Counter Styles
 * Version: 1.0.0
 * Author: FOXCO
 * Author URI: https://foxco.net
 */

/* Base Wrapper Styles */
.foxco-fomo-wrapper {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    transition: all 0.3s ease;
    line-height: 1;
}

.foxco-fomo-icon {
    font-size: 1.2em;
    line-height: 1;
}

.foxco-fomo-count {
    font-weight: 700;
    font-size: 1.1em;
}

.foxco-fomo-text-before,
.foxco-fomo-text-after {
    font-size: 0.95em;
}

/* Badge Style (Default) */
.foxco-fomo-style-badge {
    background: linear-gradient(135deg, #FF6B35 0%, #FF8555 100%);
    color: #ffffff;
    padding: 12px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

.foxco-fomo-style-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(255, 107, 53, 0.4);
}

/* Pill Style */
.foxco-fomo-style-pill {
    background: #2D3748;
    color: #ffffff;
    padding: 10px 24px;
    border-radius: 50px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    border: 2px solid #4A5568;
}

.foxco-fomo-style-pill .foxco-fomo-count {
    background: #FF6B35;
    padding: 4px 12px;
    border-radius: 20px;
    margin: 0 4px;
}

.foxco-fomo-style-pill:hover {
    border-color: #FF6B35;
}

/* Minimal Style */
.foxco-fomo-style-minimal {
    background: transparent;
    color: #333333;
    padding: 8px 0;
    border-bottom: 2px solid #FF6B35;
}

.foxco-fomo-style-minimal .foxco-fomo-count {
    color: #FF6B35;
    font-size: 1.3em;
    margin: 0 4px;
}

.foxco-fomo-style-minimal .foxco-fomo-icon {
    color: #FF6B35;
}

/* Pulse Style */
.foxco-fomo-style-pulse {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    padding: 12px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    position: relative;
    overflow: visible;
}

.foxco-fomo-style-pulse::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 8px;
    background: inherit;
    animation: foxco-fomo-pulse 2s ease-in-out infinite;
    z-index: -1;
}

@keyframes foxco-fomo-pulse {
    0%, 100% {
        opacity: 0;
        transform: scale(1);
    }
    50% {
        opacity: 0.3;
        transform: scale(1.1);
    }
}

/* Alert Style */
.foxco-fomo-style-alert {
    background: #FFF5F5;
    color: #C53030;
    padding: 12px 20px;
    border-radius: 6px;
    border: 2px solid #FC8181;
    box-shadow: 0 2px 8px rgba(197, 48, 48, 0.15);
    position: relative;
}

.foxco-fomo-style-alert::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: #C53030;
    border-radius: 6px 0 0 6px;
}

.foxco-fomo-style-alert .foxco-fomo-count {
    color: #C53030;
    background: #FED7D7;
    padding: 4px 10px;
    border-radius: 4px;
    margin: 0 4px;
}

.foxco-fomo-style-alert .foxco-fomo-icon {
    animation: foxco-fomo-blink 1.5s ease-in-out infinite;
}

@keyframes foxco-fomo-blink {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.3;
    }
}

/* Number Update Animation */
.foxco-fomo-count {
    display: inline-block;
}

.foxco-fomo-count.updating {
    animation: foxco-fomo-update 0.5s ease;
}

@keyframes foxco-fomo-update {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .foxco-fomo-wrapper {
        font-size: 0.9em;
        gap: 6px;
    }
    
    .foxco-fomo-style-badge,
    .foxco-fomo-style-pulse,
    .foxco-fomo-style-alert {
        padding: 10px 16px;
    }
    
    .foxco-fomo-style-pill {
        padding: 8px 18px;
    }
}

/* Widget Specific Styles */
.widget .foxco-fomo-wrapper {
    justify-content: center;
    width: 100%;
    margin: 10px 0;
}

.widget .foxco-fomo-style-badge,
.widget .foxco-fomo-style-pulse,
.widget .foxco-fomo-style-alert {
    width: 100%;
    justify-content: center;
}

/* Accessibility */
.foxco-fomo-wrapper:focus-visible {
    outline: 3px solid #FF6B35;
    outline-offset: 2px;
}

/* Loading State */
.foxco-fomo-wrapper.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Custom Color Overrides */
.foxco-fomo-wrapper[style*="background-color"] {
    background: var(--foxco-fomo-bg) !important;
}

.foxco-fomo-wrapper[style*="color"] .foxco-fomo-count,
.foxco-fomo-wrapper[style*="color"] .foxco-fomo-text-before,
.foxco-fomo-wrapper[style*="color"] .foxco-fomo-text-after,
.foxco-fomo-wrapper[style*="color"] .foxco-fomo-icon {
    color: inherit;
}

/* Print Styles */
@media print {
    .foxco-fomo-wrapper {
        box-shadow: none !important;
    }
}

/* ===================================
   ELEMENTOR WIDGET SPECIFIC STYLES
   =================================== */

/* Elementor Wrapper */
.foxco-fomo-elementor-wrapper {
    display: block;
    width: 100%;
}

.foxco-fomo-elementor {
    display: inline-flex;
    align-items: center;
}

/* Number Prefix/Suffix */
.foxco-fomo-prefix,
.foxco-fomo-suffix {
    font-weight: 700;
    opacity: 0.8;
}

.foxco-fomo-count-wrapper {
    display: inline-flex;
    align-items: center;
}

/* Animation Effects */

/* Pulse Animation */
.foxco-fomo-animation-pulse {
    animation: foxco-fomo-pulse-effect 2s ease-in-out infinite;
}

@keyframes foxco-fomo-pulse-effect {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* Blink Animation */
.foxco-fomo-animation-blink .foxco-fomo-icon {
    animation: foxco-fomo-blink-effect 1.5s ease-in-out infinite;
}

@keyframes foxco-fomo-blink-effect {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.3;
    }
}

/* Bounce Animation */
.foxco-fomo-animation-bounce {
    animation: foxco-fomo-bounce-effect 2s ease-in-out infinite;
}

@keyframes foxco-fomo-bounce-effect {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

/* Shake Animation */
.foxco-fomo-animation-shake {
    animation: foxco-fomo-shake-effect 3s ease-in-out infinite;
}

@keyframes foxco-fomo-shake-effect {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-2px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(2px);
    }
}

/* Glow Animation */
.foxco-fomo-animation-glow {
    animation: foxco-fomo-glow-effect 2s ease-in-out infinite;
}

@keyframes foxco-fomo-glow-effect {
    0%, 100% {
        box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
    }
    50% {
        box-shadow: 0 4px 20px rgba(255, 107, 53, 0.6), 0 0 30px rgba(255, 107, 53, 0.4);
    }
}

/* Hover Effects */

/* Lift Hover */
.foxco-fomo-hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.foxco-fomo-hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

/* Grow Hover */
.foxco-fomo-hover-grow {
    transition: transform 0.3s ease;
}

.foxco-fomo-hover-grow:hover {
    transform: scale(1.1);
}

/* Shrink Hover */
.foxco-fomo-hover-shrink {
    transition: transform 0.3s ease;
}

.foxco-fomo-hover-shrink:hover {
    transform: scale(0.95);
}

/* Rotate Hover */
.foxco-fomo-hover-rotate {
    transition: transform 0.3s ease;
}

.foxco-fomo-hover-rotate:hover {
    transform: rotate(5deg);
}

/* Elementor Preview Adjustments */
.elementor-widget-foxco_fomo {
    position: relative;
}

/* Ensure proper alignment in Elementor */
.elementor-widget-foxco_fomo .foxco-fomo-elementor-wrapper[style*="text-align: center"] .foxco-fomo-wrapper {
    margin-left: auto;
    margin-right: auto;
}

.elementor-widget-foxco_fomo .foxco-fomo-elementor-wrapper[style*="text-align: right"] .foxco-fomo-wrapper {
    margin-left: auto;
}

/* Elementor Editing Mode */
.elementor-editor-active .foxco-fomo-wrapper {
    pointer-events: none;
}

/* Responsive Elementor Adjustments */
@media (max-width: 767px) {
    .elementor-widget-foxco_fomo .foxco-fomo-wrapper {
        font-size: 0.9em;
    }
}
