/**
 * AuroraEnergy - Styly pro počítadlo návštěvníků
 * 
 * @author IT specialista Josef Feneš
 * @version 1.0.0
 */

/* ============================================
   WIDGET POČÍTADLA NÁVŠTĚVNÍKŮ
   ============================================ */

.visitor-counter-widget {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-radius: 9999px;
    color: white;
    font-size: 0.875rem;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
    transition: all 0.3s ease;
}

.visitor-counter-widget:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

.visitor-counter-widget .visitor-icon {
    width: 1.25rem;
    height: 1.25rem;
    position: relative;
}

.visitor-counter-widget .visitor-icon::before {
    content: '';
    position: absolute;
    width: 0.5rem;
    height: 0.5rem;
    background: #fbbf24;
    border-radius: 50%;
    top: 0;
    right: 0;
    animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.7;
    }
}

.visitor-counter-widget .visitor-online-count {
    font-weight: 700;
    font-size: 1rem;
    min-width: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
}

.visitor-counter-widget .visitor-online-count.updating {
    transform: scale(1.1);
    color: #fbbf24;
}

.visitor-counter-widget .visitor-online-count.error {
    color: #fca5a5;
}

.visitor-counter-widget .visitor-label {
    opacity: 0.9;
}

/* ============================================
   KOMPAKTNÍ VERZE (pro header/footer)
   ============================================ */

.visitor-counter-compact {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 0.5rem;
    color: #10b981;
    font-size: 0.75rem;
    font-weight: 500;
}

.visitor-counter-compact .visitor-dot {
    width: 0.5rem;
    height: 0.5rem;
    background: #10b981;
    border-radius: 50%;
    animation: pulse-dot 2s infinite;
}

.visitor-counter-compact .visitor-online-count {
    font-weight: 700;
}

/* ============================================
   DETAILNÍ STATISTIKY PANEL
   ============================================ */

.visitor-stats-panel {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    border: 1px solid #e5e7eb;
}

.visitor-stats-panel h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.visitor-stats-panel h3 svg {
    color: #10b981;
}

.visitor-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
}

.visitor-stat-item {
    text-align: center;
    padding: 1rem;
    background: #f9fafb;
    border-radius: 0.75rem;
    transition: all 0.2s ease;
}

.visitor-stat-item:hover {
    background: #f3f4f6;
    transform: translateY(-2px);
}

.visitor-stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: #10b981;
    line-height: 1;
    margin-bottom: 0.25rem;
}

.visitor-stat-value.primary {
    color: #10b981;
}

.visitor-stat-value.secondary {
    color: #6b7280;
}

.visitor-stat-label {
    font-size: 0.75rem;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

/* ============================================
   ADMIN DASHBOARD WIDGET
   ============================================ */

.visitor-admin-widget {
    background: linear-gradient(135deg, #065f46 0%, #047857 50%, #059669 100%);
    border-radius: 1rem;
    padding: 1.5rem;
    color: white;
    position: relative;
    overflow: hidden;
}

.visitor-admin-widget::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -25%;
    width: 50%;
    height: 150%;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    transform: rotate(-30deg);
}

.visitor-admin-widget .widget-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
}

.visitor-admin-widget .widget-title {
    font-size: 0.875rem;
    font-weight: 500;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.visitor-admin-widget .widget-icon {
    width: 2.5rem;
    height: 2.5rem;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.visitor-admin-widget .widget-value {
    font-size: 3rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 1;
}

.visitor-admin-widget .widget-subtitle {
    font-size: 0.875rem;
    opacity: 0.8;
    position: relative;
    z-index: 1;
}

.visitor-admin-widget .widget-footer {
    display: flex;
    justify-content: space-between;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    z-index: 1;
}

.visitor-admin-widget .footer-stat {
    text-align: center;
}

.visitor-admin-widget .footer-stat-value {
    font-size: 1.25rem;
    font-weight: 600;
}

.visitor-admin-widget .footer-stat-label {
    font-size: 0.625rem;
    text-transform: uppercase;
    opacity: 0.7;
    letter-spacing: 0.05em;
}

/* ============================================
   ŽIVÝ INDIKÁTOR
   ============================================ */

.visitor-live-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.75rem;
    color: #10b981;
}

.visitor-live-indicator::before {
    content: '';
    width: 0.5rem;
    height: 0.5rem;
    background: #10b981;
    border-radius: 50%;
    animation: pulse-live 1.5s infinite;
}

@keyframes pulse-live {
    0% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    }
    70% {
        box-shadow: 0 0 0 6px rgba(16, 185, 129, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

/* ============================================
   FOOTER WIDGET
   ============================================ */

.visitor-footer-widget {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.875rem;
}

.visitor-footer-widget .live-dot {
    width: 0.5rem;
    height: 0.5rem;
    background: #10b981;
    border-radius: 50%;
    animation: pulse-live 1.5s infinite;
}

.visitor-footer-widget .visitor-online-count {
    font-weight: 600;
    color: #10b981;
}

/* ============================================
   TMAVÝ REŽIM
   ============================================ */

.dark .visitor-counter-compact,
[data-theme="dark"] .visitor-counter-compact {
    background: rgba(16, 185, 129, 0.2);
    border-color: rgba(16, 185, 129, 0.3);
}

.dark .visitor-stats-panel,
[data-theme="dark"] .visitor-stats-panel {
    background: #1f2937;
    border-color: #374151;
}

.dark .visitor-stats-panel h3,
[data-theme="dark"] .visitor-stats-panel h3 {
    color: #f3f4f6;
}

.dark .visitor-stat-item,
[data-theme="dark"] .visitor-stat-item {
    background: #374151;
}

.dark .visitor-stat-label,
[data-theme="dark"] .visitor-stat-label {
    color: #9ca3af;
}

/* ============================================
   RESPONZIVNÍ ÚPRAVY
   ============================================ */

@media (max-width: 640px) {
    .visitor-counter-widget {
        padding: 0.375rem 0.75rem;
        font-size: 0.75rem;
    }
    
    .visitor-counter-widget .visitor-online-count {
        font-size: 0.875rem;
    }
    
    .visitor-admin-widget .widget-value {
        font-size: 2.5rem;
    }
    
    .visitor-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
