/* ──────────────────────────────────────────────────────────────────────────────
   Q3Rally Visitor Counter – Frontend Styles  v1.1
   ────────────────────────────────────────────────────────────────────────────── */

/* ── Base container ─────────────────────────────────────────────────────────── */
.q3vc-counter {
    font-family: inherit;
    margin: 1.25em 0;
}

.q3vc-title {
    margin-bottom: 0.6em;
    font-size: 1em;
    font-weight: 600;
}

/* ── Grid ───────────────────────────────────────────────────────────────────── */
.q3vc-grid {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
}

/* ── Tile ───────────────────────────────────────────────────────────────────── */
.q3vc-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px 8px;           /* smaller than before */
    border-radius: 8px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    text-align: center;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    min-width: 0;
}

.q3vc-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
}

/* Colour accents */
.q3vc-total          { border-top: 3px solid #4a90e2; }
.q3vc-today          { border-top: 3px solid #27ae60; }
.q3vc-online         { border-top: 3px solid #e74c3c; }
.q3vc-pageviews      { border-top: 3px solid #f39c12; }
.q3vc-downloads      { border-top: 3px solid #8e44ad; }
.q3vc-downloads-today { border-top: 3px solid #16a085; }

/* ── Icon ───────────────────────────────────────────────────────────────────── */
.q3vc-icon {
    font-size: 1.25em;           /* slightly smaller */
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 1.6em;
    line-height: 1;
}

/* ── Number ─────────────────────────────────────────────────────────────────── */
.q3vc-number {
    font-size: 1.55em;           /* trimmed down */
    font-weight: 700;
    line-height: 1.1;
    color: #1a1a2e;
    transition: color 0.3s ease;
    white-space: nowrap;
}

/* Flash on AJAX update */
.q3vc-number.q3vc-updating {
    color: #4a90e2;
}

/* Count-up animation placeholder – JS animates from 0 */
.q3vc-number[data-animating="true"] {
    color: #555;
}

/* ── Label ──────────────────────────────────────────────────────────────────── */
.q3vc-label {
    font-size: 0.68em;           /* a touch smaller */
    color: #777;
    margin-top: 3px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    line-height: 1.2;
    word-break: break-word;
}

/* ── Pulsing dot (Online Now) ───────────────────────────────────────────────── */
.q3vc-pulse-dot {
    display: inline-block;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: #e74c3c;
    box-shadow: 0 0 0 0 rgba(231, 76, 60, 0.4);
    animation: q3vc-pulse 2s infinite;
}

@keyframes q3vc-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(231, 76, 60, 0.5); }
    70%  { box-shadow: 0 0 0 8px rgba(231, 76, 60, 0); }
    100% { box-shadow: 0 0 0 0 rgba(231, 76, 60, 0); }
}

/* ── Minimal style ──────────────────────────────────────────────────────────── */
.q3vc-style-minimal .q3vc-item {
    padding: 7px 6px;
    background: transparent;
    border: none;
    border-top: 2px solid currentColor;
}
.q3vc-style-minimal .q3vc-icon   { font-size: 0.9em; height: auto; margin-bottom: 2px; }
.q3vc-style-minimal .q3vc-number { font-size: 1.2em; }
.q3vc-style-minimal .q3vc-label  { font-size: 0.62em; }

/* ── Compact style (single column, rows) ────────────────────────────────────── */
.q3vc-style-compact .q3vc-grid {
    grid-template-columns: 1fr;
}
.q3vc-style-compact .q3vc-item {
    flex-direction: row;
    justify-content: flex-start;
    gap: 10px;
    padding: 8px 12px;
    text-align: left;
}
.q3vc-style-compact .q3vc-icon   { margin-bottom: 0; font-size: 1em; height: auto; flex-shrink: 0; }
.q3vc-style-compact .q3vc-number { font-size: 1.1em; }
.q3vc-style-compact .q3vc-label  { margin-top: 0; margin-left: auto; }

/* ── Widget-specific (2-column grid) ────────────────────────────────────────── */
.q3vc-widget-grid {
    grid-template-columns: repeat(2, 1fr);
}

@media (max-width: 240px) {
    .q3vc-widget-grid { grid-template-columns: 1fr; }
}

/* ── Responsive ─────────────────────────────────────────────────────────────── */
@media (max-width: 480px) {
    .q3vc-grid   { grid-template-columns: repeat(2, 1fr); }
    .q3vc-number { font-size: 1.3em; }
}

@media (max-width: 300px) {
    .q3vc-grid { grid-template-columns: 1fr; }
}
