/* ========== ИНФОРМЕР И МОДАЛКА (ЧИСТАЯ ВЕРСИЯ) ========== */

/* Базовый виджет */
.custom-informer {
    background: white;
    border-radius: 16px;
    padding: 15px;
    box-shadow: 0 4px 20px rgba(27, 59, 106, 0.08);
    cursor: pointer;
    transition: transform 0.2s;
    border: 1px solid rgba(158, 123, 86, 0.1);
    position: relative;
    z-index: 10;
}
.custom-informer:hover { transform: translateY(-3px); }

.informer-header { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.informer-icon { 
    width: 36px; height: 36px; background: var(--bg-gradient); 
    border-radius: 10px; display: flex; align-items: center; justify-content: center; color: white; 
}
.informer-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.stat-item-informer { text-align: center; background: #f8faff; padding: 8px 4px; border-radius: 8px; }
.stat-value { font-size: 1.3rem; font-weight: 800; color: var(--deep-blue); line-height: 1; }
.stat-label { font-size: 0.65rem; color: #8898aa; text-transform: uppercase; margin-top: 4px; }

/* Онлайн индикатор */
.online-status { text-align: center; margin-top: 10px; font-size: 0.8rem; color: #666; display: flex; align-items: center; justify-content: center; gap: 6px; }
.online-dot { width: 8px; height: 8px; background: #2ecc71; border-radius: 50%; animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(46,204,113,0.7); } 70% { box-shadow: 0 0 0 6px rgba(46,204,113,0); } 100% { box-shadow: 0 0 0 0 rgba(46,204,113,0); } }

/* ========== МОДАЛЬНОЕ ОКНО (FIXED POSITIONING) ========== */
.stats-popup-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    z-index: 9999; display: none; /* Скрыто по умолчанию */
}
.stats-popup-overlay.show { display: block; }

.stats-popup-content {
    position: absolute; /* Абсолютное позиционирование относительно viewport */
    background: white;
    width: 340px;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    border: 1px solid rgba(158, 123, 86, 0.2);
    opacity: 0; transform: translateY(10px);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: auto;
}
.stats-popup-overlay.show .stats-popup-content { opacity: 1; transform: translateY(0); }

.popup-close {
    position: absolute; top: 12px; right: 12px;
    background: #f0f0f0; border: none; width: 24px; height: 24px;
    border-radius: 50%; font-size: 0.8rem; color: #666; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
}
.popup-close:hover { background: #e0e0e0; }

/* График */
.week-chart-container {
    display: flex; align-items: flex-end; justify-content: space-between;
    height: 140px; margin-top: 15px; padding-bottom: 5px; border-bottom: 1px solid #eee;
}
.chart-bar-wrapper { flex: 1; display: flex; flex-direction: column; align-items: center; height: 100%; justify-content: flex-end; margin: 0 2px; position: relative; }
.chart-bar-wrapper:hover::after {
    content: attr(data-tooltip); position: absolute; top: -30px; left: 50%; transform: translateX(-50%);
    background: var(--deep-blue); color: white; padding: 4px 8px; border-radius: 4px; font-size: 0.7rem; white-space: nowrap; z-index: 20;
}
.chart-bars-group { display: flex; align-items: flex-end; gap: 2px; height: 100%; width: 100%; justify-content: center; }
.chart-bar { width: 40%; border-radius: 3px 3px 0 0; min-height: 2px; transition: height 0.6s ease-out; }
.bar-visitors { background: var(--deep-blue); opacity: 0.8; }
.bar-generates { background: var(--gold-brown); opacity: 0.9; }
.day-label { margin-top: 8px; font-size: 0.7rem; color: #8898aa; font-weight: 600; }
.legend { display: flex; justify-content: space-between; margin-top: 15px; font-size: 0.8rem; color: #666; }
.legend span i { margin-right: 4px; }
