/* ==========================================================================
   AR Blog Statistics — Premium Front-end Stylesheet
   ========================================================================== */

/* Modern premium widget container inside sidebar card */
.ar-stats-modern-widget {
    background: transparent;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.ar-stats-widget-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

/* Adjust header border in dark themes if detected */
.dark-mode .ar-stats-widget-header,
[data-theme="dark"] .ar-stats-widget-header {
    border-bottom-color: rgba(255, 255, 255, 0.08);
}

.ar-stats-header-icon {
    font-size: 20px;
    line-height: 1;
}

.ar-stats-widget-header h3 {
    margin: 0 !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    color: inherit;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ar-stats-stats-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Premium stat item */
.ar-stats-stat-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    background: rgba(0, 0, 0, 0.02);
    border: 1px solid rgba(0, 0, 0, 0.03);
    border-radius: 12px;
    transition: background 0.25s ease, transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

/* Dark mode adaptive background */
.dark-mode .ar-stats-stat-item,
[data-theme="dark"] .ar-stats-stat-item {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.04);
}

.ar-stats-stat-item:hover {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.05);
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
}

.dark-mode .ar-stats-stat-item:hover,
[data-theme="dark"] .ar-stats-stat-item:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.08);
}

.ar-stats-stat-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Modern vector icon wrappers */
.ar-stats-icon-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    transition: transform 0.25s ease;
}

.ar-stats-stat-item:hover .ar-stats-icon-wrapper {
    transform: scale(1.1);
}

.ar-stats-icon-wrapper svg {
    width: 15px;
    height: 15px;
    display: block;
}

.ar-stats-stat-title {
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    transition: color 0.25s ease;
}

.dark-mode .ar-stats-stat-title,
[data-theme="dark"] .ar-stats-stat-title {
    color: #94a3b8;
}

.ar-stats-stat-item:hover .ar-stats-stat-title {
    color: #0f172a;
}

.dark-mode .ar-stats-stat-item:hover .ar-stats-stat-title,
[data-theme="dark"] .ar-stats-stat-item:hover .ar-stats-stat-title {
    color: #f1f5f9;
}

.ar-stats-stat-value {
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
    font-variant-numeric: tabular-nums;
    transition: color 0.25s ease;
}

.dark-mode .ar-stats-stat-value,
[data-theme="dark"] .ar-stats-stat-value {
    color: #f1f5f9;
}

/* Glowing green pulse for Online status */
.ar-stats-pulse-dot {
    width: 8px;
    height: 8px;
    background-color: #10b981;
    border-radius: 50%;
    position: relative;
    display: inline-block;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    animation: ar-cv-pulse 2s infinite;
}

@keyframes ar-cv-pulse {
    0% {
        transform: scale(0.92);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    }
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 6px rgba(16, 185, 129, 0);
    }
    100% {
        transform: scale(0.92);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

/* Highlights for online status item specifically */
.ar-stats-stat-item.status-online {
    background: rgba(16, 185, 129, 0.05);
    border-color: rgba(16, 185, 129, 0.08);
}

.dark-mode .ar-stats-stat-item.status-online,
[data-theme="dark"] .ar-stats-stat-item.status-online {
    background: rgba(16, 185, 129, 0.08);
    border-color: rgba(16, 185, 129, 0.12);
}

.ar-stats-stat-item.status-online:hover {
    background: rgba(16, 185, 129, 0.08);
    border-color: rgba(16, 185, 129, 0.15);
}

.ar-stats-stat-item.status-online .ar-stats-stat-title {
    color: #065f46;
}

.dark-mode .ar-stats-stat-item.status-online .ar-stats-stat-title,
[data-theme="dark"] .ar-stats-stat-item.status-online .ar-stats-stat-title {
    color: #a7f3d0;
}

.ar-stats-stat-item.status-online .ar-stats-stat-value {
    color: #059669;
}

.dark-mode .ar-stats-stat-item.status-online .ar-stats-stat-value,
[data-theme="dark"] .ar-stats-stat-item.status-online .ar-stats-stat-value {
    color: #34d399;
}


/* ==========================================================================
   Premium Counter Box inside Single Posts
   ========================================================================== */
.ar-stats-front-counter {
    display: flex;
    gap: 16px;
    margin: 32px 0 20px 0;
    padding: 16px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.04), rgba(168, 85, 247, 0.04));
    border: 1px solid rgba(99, 102, 241, 0.08);
    border-radius: 16px;
    box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.5);
    transition: transform 0.3s ease;
}

.dark-mode .ar-stats-front-counter,
[data-theme="dark"] .ar-stats-front-counter {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(168, 85, 247, 0.08));
    border-color: rgba(99, 102, 241, 0.12);
    box-shadow: none;
}

.ar-stats-front-counter:hover {
    transform: translateY(-1px);
}

.ar-stats-counter-box {
    flex: 1;
    text-align: center;
    padding: 16px 12px;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.9);
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
    transition: background 0.25s ease, transform 0.25s ease;
}

.dark-mode .ar-stats-counter-box,
[data-theme="dark"] .ar-stats-counter-box {
    background: rgba(15, 23, 42, 0.6);
    border-color: rgba(255, 255, 255, 0.04);
    box-shadow: none;
}

.ar-stats-counter-box:hover {
    background: #ffffff;
    transform: translateY(-2px);
}

.dark-mode .ar-stats-counter-box:hover,
[data-theme="dark"] .ar-stats-counter-box:hover {
    background: rgba(15, 23, 42, 0.85);
}

.ar-stats-counter-number {
    display: block;
    font-size: 24px;
    font-weight: 800;
    line-height: 1.2;
    background: linear-gradient(135deg, #6366f1, #a855f7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.5px;
    margin-bottom: 4px;
}

.ar-stats-counter-label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.dark-mode .ar-stats-counter-label,
[data-theme="dark"] .ar-stats-counter-label {
    color: #94a3b8;
}


/* ==========================================================================
   Premium Shortcode Counter inline
   ========================================================================== */
.ar-stats-shortcode-counter {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0, 0, 0, 0.04);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    color: #475569;
}

.dark-mode .ar-stats-shortcode-counter,
[data-theme="dark"] .ar-stats-shortcode-counter {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.06);
    color: #94a3b8;
}

.ar-stats-shortcode-counter strong {
    color: #6366f1;
}

.dark-mode .ar-stats-shortcode-counter strong,
[data-theme="dark"] .ar-stats-shortcode-counter strong {
    color: #818cf8;
}

/* ==========================================================================
   Premium Tooltip styling for Hover Country Lists
   ========================================================================== */
.ar-stats-stat-item {
    position: relative;
}

.ar-stats-tooltip {
    display: block;
    position: absolute;
    bottom: 105%; /* Position elegantly right above the line */
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    width: 240px;
    background: rgba(15, 23, 42, 0.96); /* Slate dark theme background by default */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4), 0 4px 10px rgba(0, 0, 0, 0.2);
    z-index: 99999; /* Overlap any absolute element priority */
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.3s ease;
    box-sizing: border-box;
}

/* Tooltip Arrow pointing down */
.ar-stats-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 6px;
    border-style: solid;
    border-color: rgba(15, 23, 42, 0.96) transparent transparent transparent;
}

/* Tooltip Arrow border simulation */
.ar-stats-tooltip::before {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 7px;
    border-style: solid;
    border-color: rgba(255, 255, 255, 0.1) transparent transparent transparent;
    z-index: -1;
}

/* Show on hover */
.ar-stats-stat-item:hover .ar-stats-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* Tooltip Header */
.ar-stats-tooltip-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 8px;
    text-align: left;
}

.ar-stats-tooltip-globe {
    font-size: 16px;
    line-height: 1;
}

.ar-stats-tooltip-header-title {
    font-size: 11px;
    font-weight: 800;
    color: #f8fafc;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

/* List container */
.ar-stats-tooltip-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Row item with bar */
.ar-stats-tooltip-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
    text-align: left;
}

.ar-stats-tooltip-country-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    color: #e2e8f0;
}

.ar-stats-tooltip-country-name {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
}

.ar-stats-tooltip-flag {
    font-size: 14px;
    line-height: 1;
}

.ar-stats-tooltip-country-count {
    font-weight: 700;
    color: #94a3b8;
    font-variant-numeric: tabular-nums;
}

/* Progress bar system */
.ar-stats-tooltip-progress-bg {
    width: 100%;
    height: 5px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    overflow: hidden;
}

.ar-stats-tooltip-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #6366f1, #3b82f6); /* Premium blue/indigo gradient */
    border-radius: 10px;
    width: 0%;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}


