/**
 * KineticCopy - Dashboard Widget Styles
 * Design Theme v2.0.4 — Copy Crimson Edition
 *
 * Widget displayed on WordPress admin dashboard
 */

/* ========================================
   WIDGET CONTAINER
   ======================================== */
.claude-dashboard-widget {
    padding: 0;
    background: var(--kinetic-bg-secondary, #ffffff);
    color: var(--kinetic-text-primary, #1a1a1a);
}

.claude-dashboard-widget .inside {
    margin: 0;
    padding: 0;
}

/* ========================================
   WIDGET HEADER
   ======================================== */
.widget-header {
    background: linear-gradient(135deg, #D6263A 0%, #A6172A 100%);
    padding: 20px;
    border-radius: 8px 8px 0 0;
    color: #ffffff;
    position: relative;
    overflow: hidden;
}

.widget-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50%;
}

.widget-header h3 {
    margin: 0 0 6px 0;
    font-size: 16px;
    font-weight: 600;
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: 0.04em;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 8px;
}

.widget-header h3::before {
    content: '⚡';
    font-size: 16px;
    font-family: inherit;
}

.widget-header p {
    margin: 0;
    font-size: 12px;
    font-family: 'JetBrains Mono', monospace;
    opacity: 0.85;
    color: #ffffff;
    letter-spacing: 0.02em;
}

/* ========================================
   STATS GRID
   ======================================== */
.widget-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1px;
    background: var(--kinetic-border, #e5e5e5);
    border: 1px solid var(--kinetic-border, #e5e5e5);
}

.stat-item {
    background: var(--kinetic-bg-secondary, #ffffff);
    padding: 16px;
    text-align: center;
    transition: all 0.2s ease;
    position: relative;
}

.stat-item:hover {
    background: #FFF0F2;
    transform: scale(1.02);
    z-index: 1;
}

.stat-number {
    display: block;
    font-size: 28px;
    font-weight: 700;
    background: linear-gradient(135deg, #D6263A 0%, #A6172A 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 4px;
}

.stat-label {
    display: block;
    font-size: 10px;
    font-family: 'JetBrains Mono', monospace;
    text-transform: uppercase;
    font-weight: 500;
    letter-spacing: 0.06em;
    color: var(--kinetic-text-muted, #A1A1AA);
}

/* ========================================
   INSIGHTS SECTION
   ======================================== */
.widget-insights {
    padding: 20px;
}

.widget-insights h4 {
    font-size: 11px;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--kinetic-text-muted, #A1A1AA);
    margin: 0 0 14px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.widget-insights h4::before {
    content: '';
    display: inline-block;
    width: 3px;
    height: 14px;
    background: linear-gradient(135deg, #D6263A 0%, #A6172A 100%);
    border-radius: 2px;
}

.insight-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.insight-item {
    padding: 12px;
    margin-bottom: 8px;
    background: var(--kinetic-bg-tertiary, #f5f5f5);
    border-radius: 6px;
    border-left: 3px solid #D6263A;
    transition: all 0.2s ease;
}

.insight-item:hover {
    background: #FFF0F2;
    border-left-color: #A6172A;
    transform: translateX(3px);
}

.insight-item:nth-child(2) {
    border-left-color: #A6172A;
}

.insight-item:nth-child(3) {
    border-left-color: #7A1620;
}

.insight-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--kinetic-text-primary, #1a1a1a);
    margin-bottom: 4px;
}

.insight-description {
    font-size: 12px;
    font-family: 'JetBrains Mono', monospace;
    color: var(--kinetic-text-secondary, #4a4a4a);
    line-height: 1.6;
}

/* ========================================
   QUICK ACTIONS
   ======================================== */
.widget-actions {
    padding: 16px 20px;
    background: var(--kinetic-bg-tertiary, #f5f5f5);
    border-top: 1px solid var(--kinetic-border, #e5e5e5);
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.widget-action-btn {
    flex: 1;
    min-width: 140px;
    padding: 10px 16px;
    background: linear-gradient(135deg, #D6263A 0%, #A6172A 100%);
    color: #ffffff;
    text-decoration: none;
    border-radius: 6px;
    font-size: 12px;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-align: center;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(214, 38, 58, 0.25);
}

.widget-action-btn:hover {
    background: linear-gradient(135deg, #A6172A 0%, #7A1620 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(214, 38, 58, 0.35);
    color: #ffffff;
    text-decoration: none;
}

.widget-action-btn.secondary {
    background: var(--kinetic-bg-secondary, #ffffff);
    color: var(--kinetic-text-primary, #1a1a1a);
    border: 1.5px solid #F5C0C5;
    box-shadow: none;
    font-family: 'JetBrains Mono', monospace;
}

.widget-action-btn.secondary:hover {
    background: #FFF0F2;
    border-color: #D6263A;
    color: #D6263A;
    box-shadow: none;
    text-decoration: none;
}

/* ========================================
   EMPTY STATE
   ======================================== */
.widget-empty-state {
    padding: 40px 20px;
    text-align: center;
}

.widget-empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.25;
}

.widget-empty-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--kinetic-text-primary, #1a1a1a);
    margin-bottom: 8px;
}

.widget-empty-description {
    font-size: 12px;
    font-family: 'JetBrains Mono', monospace;
    color: var(--kinetic-text-muted, #A1A1AA);
    margin-bottom: 20px;
    line-height: 1.6;
}

/* ========================================
   LOADING STATE
   ======================================== */
.widget-loading {
    padding: 40px;
    text-align: center;
}

.widget-loading-spinner {
    display: inline-block;
    width: 32px;
    height: 32px;
    border: 3px solid #F5C0C5;
    border-top-color: #D6263A;
    border-radius: 50%;
    animation: kc-spin 0.8s linear infinite;
}

@keyframes kc-spin {
    to { transform: rotate(360deg); }
}

.widget-loading-text {
    margin-top: 16px;
    font-size: 12px;
    font-family: 'JetBrains Mono', monospace;
    color: var(--kinetic-text-muted, #A1A1AA);
    letter-spacing: 0.03em;
}

/* ========================================
   RECENT SNIPPETS
   ======================================== */
.widget-recent-snippets {
    padding: 20px;
    border-top: 1px solid var(--kinetic-border, #e5e5e5);
}

.widget-recent-snippets h4 {
    font-size: 11px;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--kinetic-text-muted, #A1A1AA);
    margin: 0 0 12px 0;
}

.snippet-preview {
    padding: 10px;
    margin-bottom: 8px;
    background: var(--kinetic-bg-tertiary, #f5f5f5);
    border-radius: 4px;
    font-size: 12px;
    color: var(--kinetic-text-secondary, #4a4a4a);
    line-height: 1.5;
    cursor: pointer;
    transition: all 0.2s ease;
    border-left: 2px solid transparent;
}

.snippet-preview:hover {
    background: #FFF0F2;
    border-left-color: #D6263A;
}

.snippet-preview-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 6px;
    font-size: 11px;
    font-family: 'JetBrains Mono', monospace;
    color: var(--kinetic-text-muted, #A1A1AA);
}

.snippet-preview-rating {
    color: #D6263A;
}

/* ========================================
   KINETIC BRANDING BADGE
   ======================================== */
.widget-kinetic-badge {
    padding: 10px 20px;
    background: var(--kinetic-bg-tertiary, #f5f5f5);
    border-top: 1px solid var(--kinetic-border, #e5e5e5);
    text-align: center;
    font-size: 10px;
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: 0.04em;
    color: var(--kinetic-text-muted, #A1A1AA);
}

.widget-kinetic-badge strong {
    color: #D6263A;
    font-weight: 600;
}

.kinetic-logo-mini {
    display: inline-block;
    width: 10px;
    height: 10px;
    background: linear-gradient(135deg, #D6263A 0%, #7A1620 100%);
    border-radius: 50%;
    margin: 0 3px;
    vertical-align: middle;
}

/* ========================================
   DARK MODE SUPPORT
   ======================================== */
@media (prefers-color-scheme: dark) {
    .claude-dashboard-widget {
        background: #2a2a2a;
        color: #FCFBF8;
    }

    .stat-item {
        background: #2a2a2a;
    }

    .stat-item:hover {
        background: rgba(214, 38, 58, 0.1);
    }

    .widget-insights {
        background: #2a2a2a;
    }

    .insight-item {
        background: #333333;
    }

    .insight-item:hover {
        background: rgba(214, 38, 58, 0.1);
    }

    .widget-actions {
        background: #333333;
        border-top-color: #404040;
    }

    .widget-action-btn.secondary {
        background: #2a2a2a;
        color: #FCFBF8;
        border-color: #5a2028;
    }

    .widget-action-btn.secondary:hover {
        background: rgba(214, 38, 58, 0.12);
    }

    .widget-recent-snippets {
        border-top-color: #404040;
    }

    .snippet-preview {
        background: #333333;
        color: #d4d4d4;
    }

    .snippet-preview:hover {
        background: rgba(214, 38, 58, 0.1);
    }

    .widget-kinetic-badge {
        background: #333333;
        border-top-color: #404040;
    }

    .widget-loading-spinner {
        border-color: #5a2028;
        border-top-color: #D6263A;
    }
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */
@media (max-width: 768px) {
    .widget-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .widget-actions {
        flex-direction: column;
    }

    .widget-action-btn {
        width: 100%;
        min-width: auto;
    }

    .stat-number {
        font-size: 24px;
    }
}

/* KineticCopy Design Theme v2.0.4 — Dashboard Widget */
