/**
 * WhoKnew Views - Dashboard Achievements Widget Styles
 * Gamification widget showing recent achievements, product milestones, and progress
 * 
 * @package WHOKNEW_VIEWS_PACKAGE
 * @author WHOKNEW_VIEWS_AUTHOR
 */

#wkviews_achievements_dashboard_widget .inside {
    margin: 0 !important;
    padding: 0 !important;
}
.wkviews-dashboard-widget {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: #e2e8f0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    min-height: 600px;
    max-height: 800px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* Tooltip System */
.wkviews-tooltip {
    position: fixed;
    background: rgba(15, 23, 42, 0.96);
    color: #fbbf24;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 11px;
    line-height: 1.5;
    max-width: 240px;
    pointer-events: none;
    z-index: 999999;
    opacity: 0;
    transition: opacity 0.2s ease;
    border: 2px solid rgba(251, 191, 36, 0.3);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(251, 191, 36, 0.1);
    backdrop-filter: blur(8px);
    font-weight: 500;
}
.wkviews-tooltip.visible {
    opacity: 1;
}
.wkviews-tooltip::before {
    content: '';
    position: absolute;
    width: 0;
    height: 0;
    border-style: solid;
}
/* Tooltip arrow positioning */
.wkviews-tooltip[data-position="top"]::before {
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 6px 6px 0 6px;
    border-color: rgba(15, 23, 42, 0.96) transparent transparent transparent;
}
.wkviews-tooltip[data-position="bottom"]::before {
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 0 6px 6px 6px;
    border-color: transparent transparent rgba(15, 23, 42, 0.96) transparent;
}
.wkviews-tooltip[data-position="left"]::before {
    right: -6px;
    top: 50%;
    transform: translateY(-50%);
    border-width: 6px 0 6px 6px;
    border-color: transparent transparent transparent rgba(15, 23, 42, 0.96);
}
.wkviews-tooltip[data-position="right"]::before {
    left: -6px;
    top: 50%;
    transform: translateY(-50%);
    border-width: 6px 6px 6px 0;
    border-color: transparent rgba(15, 23, 42, 0.96) transparent transparent;
}
/* Recent Achievement Cards */
.wkviews-recent-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}
.wkviews-recent-card {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.2) 0%, rgba(245, 158, 11, 0.2) 100%);
    border: 2px solid rgba(251, 191, 36, 0.4);
    border-radius: 8px;
    padding: 10px 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}
.wkviews-recent-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 0%, rgba(251, 191, 36, 0.1), transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
}
.wkviews-recent-card:hover {
    transform: translateY(-4px);
    border-color: #fbbf24;
    box-shadow: 0 8px 24px rgba(251, 191, 36, 0.5);
}
.wkviews-recent-card:hover::before {
    opacity: 1;
}
.wkviews-recent-icon {
    font-size: 32px;
    margin-bottom: 6px;
    filter: drop-shadow(0 2px 8px rgba(251, 191, 36, 0.6));
}
.wkviews-recent-name {
    font-size: 10px;
    font-weight: 700;
    color: #fbbf24;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}
.wkviews-recent-product {
    font-size: 9px;
    color: #94a3b8;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.wkviews-recent-time {
    font-size: 8px;
    color: #64748b;
    font-weight: 600;
}
.wkviews-multiplier-badge {
    position: absolute;
    bottom: 6px;
    right: 6px;
    background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
    color: #ffffff;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 6px;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.6), 0 0 0 2px rgba(220, 38, 38, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    letter-spacing: 0.5px;
    line-height: 1;
}

/* Empty State */
.wkviews-empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #94a3b8;
}
.wkviews-empty-icon {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.5;
}
.wkviews-empty-title {
    font-size: 14px;
    font-weight: 700;
    color: #64748b;
    margin-bottom: 8px;
}
.wkviews-empty-text {
    font-size: 12px;
    color: #64748b;
    line-height: 1.6;
}

/* Tab Navigation */
.wkviews-tabs {
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 12px 0;
    background: linear-gradient(135deg, #0a0f1e 0%, #1e293b 100%);
    border-bottom: 2px solid rgba(251, 191, 36, 0.2);
    flex-shrink: 0;
}
.wkviews-tab {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.3) 0%, rgba(245, 158, 11, 0.3) 100%);
    box-shadow: 0 2px 8px rgba(251, 191, 36, 0.3);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.3s ease;
    border: 3px solid rgba(251, 191, 36, 0.5);
    opacity: 0.7;
}
.wkviews-tab.active {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    box-shadow: 0 4px 12px rgba(251, 191, 36, 0.6), 0 0 0 3px rgba(251, 191, 36, 0.3);
    border: 3px solid #0f172a;
    opacity: 1;
}
.wkviews-tab:hover {
    transform: translateY(-2px) scale(1.05);
    opacity: 1;
}

/* Content Area */
.wkviews-content {
    padding: 16px;
    overflow-y: auto;
    flex: 1;
    max-height: calc(800px - 60px);
}
.wkviews-content::-webkit-scrollbar {
    width: 8px;
}
.wkviews-content::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.5);
    border-radius: 4px;
}
.wkviews-content::-webkit-scrollbar-thumb {
    background: rgba(251, 191, 36, 0.3);
    border-radius: 4px;
}
.wkviews-content::-webkit-scrollbar-thumb:hover {
    background: rgba(251, 191, 36, 0.5);
}

.wkviews-tab-panel {
    display: none;
}
.wkviews-tab-panel.active {
    display: block;
}

/* Progress Section */
.wkviews-progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}
.wkviews-progress-label {
    font-size: 10px;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
}
.wkviews-progress-count {
    font-size: 10px;
    font-weight: 800;
    color: #fbbf24;
}
.wkviews-progress-bar {
    height: 10px;
    background: rgba(15, 23, 42, 0.8);
    border-radius: 6px;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.5), 0 0 0 2px rgba(251, 191, 36, 0.2);
    margin-bottom: 4px;
}
.wkviews-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #fbbf24, #f59e0b);
    border-radius: 6px;
    box-shadow: 0 0 10px rgba(251, 191, 36, 0.6);
    transition: width 0.5s ease;
}
.wkviews-progress-text {
    font-size: 10px;
    color: #94a3b8;
    text-align: center;
    font-weight: 600;
}

/* Achievement Grid */
.wkviews-achievements-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-top: 16px;
}
.wkviews-achievement-item {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.6) 0%, rgba(30, 41, 59, 0.6) 100%);
    border-radius: 8px;
    padding: 10px 8px;
    text-align: center;
    transition: all 0.3s ease;
    border: 2px solid rgba(100, 116, 139, 0.3);
}
.wkviews-achievement-item.achieved {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.2) 0%, rgba(245, 158, 11, 0.2) 100%);
    border-color: #fbbf24;
    box-shadow: 0 4px 16px rgba(251, 191, 36, 0.3);
}
.wkviews-achievement-item.locked {
    opacity: 0.4;
}
.wkviews-achievement-icon {
    font-size: 28px;
    margin-bottom: 4px;
    filter: grayscale(100%) brightness(0.5);
}
.wkviews-achievement-item.achieved .wkviews-achievement-icon {
    filter: none;
    text-shadow: 0 2px 12px rgba(251, 191, 36, 0.6);
}
.wkviews-achievement-name {
    font-size: 9px;
    font-weight: 800;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}
.wkviews-achievement-item.achieved .wkviews-achievement-name {
    color: #fbbf24;
}
.wkviews-achievement-threshold {
    font-size: 8px;
    font-weight: 600;
    color: #64748b;
}
.wkviews-achievement-item.achieved .wkviews-achievement-threshold {
    color: #94a3b8;
}

/* Stats */
.wkviews-stat-box {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.15) 0%, rgba(147, 51, 234, 0.15) 100%);
    border: 2px solid rgba(168, 85, 247, 0.4);
    border-radius: 8px;
    padding: 10px 14px;
    text-align: center;
    margin-top: 12px;
}
.wkviews-stat-label {
    font-size: 9px;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    margin-bottom: 4px;
}
.wkviews-stat-value {
    font-size: 18px;
    font-weight: 900;
    color: #a855f7;
    text-shadow: 0 2px 10px rgba(168, 85, 247, 0.4);
}

/* Completion Card */
.wkviews-complete-card {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.2) 0%, rgba(245, 158, 11, 0.2) 100%);
    border-radius: 8px;
    padding: 10px;
    text-align: center;
    margin-bottom: 12px;
    border: 2px solid #fbbf24;
}
.wkviews-complete-icon {
    font-size: 24px;
    margin-bottom: 4px;
}
.wkviews-complete-title {
    font-size: 11px;
    font-weight: 800;
    color: #fbbf24;
    text-transform: uppercase;
    margin-bottom: 2px;
}
.wkviews-complete-subtitle {
    font-size: 9px;
    color: #94a3b8;
    font-weight: 600;
}

/* ============================================
   LIGHT THEME - Colorful Gradients
   ============================================ */
.wkviews-dashboard-widget.wkviews-theme-light {
    background: linear-gradient(135deg, #ffffff 0%, #f0f9ff 100%);
    color: #1e293b;
    border: 2px solid #e0e7ff;
}

/* Light Theme - Tabs */
.wkviews-theme-light .wkviews-tabs {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border-bottom: 2px solid #3b82f6;
}
.wkviews-theme-light .wkviews-tab {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(99, 102, 241, 0.15) 100%);
    border: 3px solid rgba(59, 130, 246, 0.3);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.2);
}
.wkviews-theme-light .wkviews-tab.active {
    background: linear-gradient(135deg, #3b82f6 0%, #6366f1 100%);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.5), 0 0 0 3px rgba(99, 102, 241, 0.2);
    border: 3px solid #ffffff;
}

/* Light Theme - Recent Cards */
.wkviews-theme-light .wkviews-recent-card {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 2px solid #fbbf24;
    box-shadow: 0 2px 8px rgba(251, 191, 36, 0.2);
}
.wkviews-theme-light .wkviews-recent-card:hover {
    border-color: #f59e0b;
    box-shadow: 0 8px 24px rgba(251, 191, 36, 0.4);
}
.wkviews-theme-light .wkviews-recent-name {
    color: #d97706;
}
.wkviews-theme-light .wkviews-recent-product {
    color: #78350f;
}
.wkviews-theme-light .wkviews-recent-time {
    color: #92400e;
}
.wkviews-theme-light .wkviews-multiplier-badge {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.5), 0 0 0 2px rgba(239, 68, 68, 0.2);
}

/* Light Theme - Achievement Items */
.wkviews-theme-light .wkviews-achievement-item {
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    border: 2px solid #d1d5db;
}
.wkviews-theme-light .wkviews-achievement-item.achieved {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    border-color: #10b981;
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.3);
}
.wkviews-theme-light .wkviews-achievement-item.locked {
    opacity: 0.5;
}
.wkviews-theme-light .wkviews-achievement-icon {
    filter: grayscale(80%) brightness(1.1);
}
.wkviews-theme-light .wkviews-achievement-item.achieved .wkviews-achievement-icon {
    filter: none;
    text-shadow: 0 2px 12px rgba(16, 185, 129, 0.5);
}
.wkviews-theme-light .wkviews-achievement-name {
    color: #9ca3af;
}
.wkviews-theme-light .wkviews-achievement-item.achieved .wkviews-achievement-name {
    color: #059669;
    font-weight: 800;
}
.wkviews-theme-light .wkviews-achievement-threshold {
    color: #6b7280;
}
.wkviews-theme-light .wkviews-achievement-item.achieved .wkviews-achievement-threshold {
    color: #047857;
}

/* Light Theme - Progress Section */
.wkviews-theme-light .wkviews-progress-label {
    color: #4b5563;
}
.wkviews-theme-light .wkviews-progress-count {
    color: #7c3aed;
}
.wkviews-theme-light .wkviews-progress-bar {
    background: #e5e7eb;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1), 0 0 0 2px rgba(124, 58, 237, 0.2);
}
.wkviews-theme-light .wkviews-progress-fill {
    background: linear-gradient(90deg, #7c3aed, #a855f7, #c084fc);
    box-shadow: 0 0 10px rgba(124, 58, 237, 0.5);
}
.wkviews-theme-light .wkviews-progress-text {
    color: #6b7280;
}

/* Light Theme - Stats Box */
.wkviews-theme-light .wkviews-stat-box {
    background: linear-gradient(135deg, #fae8ff 0%, #f3e8ff 100%);
    border: 2px solid #c084fc;
}
.wkviews-theme-light .wkviews-stat-label {
    color: #6b7280;
}
.wkviews-theme-light .wkviews-stat-value {
    color: #7c3aed;
    text-shadow: 0 2px 10px rgba(124, 58, 237, 0.3);
}

/* Light Theme - Complete Card */
.wkviews-theme-light .wkviews-complete-card {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 2px solid #fbbf24;
    box-shadow: 0 4px 16px rgba(251, 191, 36, 0.3);
}
.wkviews-theme-light .wkviews-complete-title {
    color: #d97706;
}
.wkviews-theme-light .wkviews-complete-subtitle {
    color: #78350f;
}

/* Light Theme - Empty State */
.wkviews-theme-light .wkviews-empty-title {
    color: #4b5563;
}
.wkviews-theme-light .wkviews-empty-text {
    color: #6b7280;
}

/* Light Theme - Content Area */
.wkviews-theme-light .wkviews-content::-webkit-scrollbar-track {
    background: rgba(229, 231, 235, 0.5);
}
.wkviews-theme-light .wkviews-content::-webkit-scrollbar-thumb {
    background: rgba(124, 58, 237, 0.3);
}
.wkviews-theme-light .wkviews-content::-webkit-scrollbar-thumb:hover {
    background: rgba(124, 58, 237, 0.5);
}

/* Light Theme - Tooltip (direct class, not descendant) */
.wkviews-tooltip.wkviews-theme-light {
    background: rgba(255, 255, 255, 0.97) !important;
    color: #7c3aed !important;
    border: 2px solid rgba(124, 58, 237, 0.4) !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(124, 58, 237, 0.1) !important;
}
.wkviews-tooltip.wkviews-theme-light[data-position="top"]::before {
    border-color: rgba(255, 255, 255, 0.97) transparent transparent transparent !important;
}
.wkviews-tooltip.wkviews-theme-light[data-position="bottom"]::before {
    border-color: transparent transparent rgba(255, 255, 255, 0.97) transparent !important;
}
.wkviews-tooltip.wkviews-theme-light[data-position="left"]::before {
    border-color: transparent transparent transparent rgba(255, 255, 255, 0.97) !important;
}
.wkviews-tooltip.wkviews-theme-light[data-position="right"]::before {
    border-color: transparent rgba(255, 255, 255, 0.97) transparent transparent !important;
}
