/**
 * Acutus Wire Design System
 * Modern, editorial-inspired design for the Wire feed
 * Inspired by factory.ai aesthetics + Twitter/X feed patterns
 * Version: 1.0
 */

/* ===== WIRE LAYOUT TOKENS ===== */
:root {
    /* Wire-specific colors */
    --wire-bg: #ffffff;
    --wire-bg-secondary: #f7f9fa;
    --wire-bg-hover: #f0f3f5;
    --wire-border: #eff3f4;
    --wire-border-dark: #cfd9de;
    --wire-text-primary: #0f1419;
    --wire-text-secondary: #536471;
    --wire-text-muted: #8899a6;
    --wire-link: #1d9bf0;
    --wire-link-hover: #1a8cd8;
    
    /* Breaking/urgent colors */
    --wire-breaking-bg: #ffeef0;
    --wire-breaking-text: #e0245e;
    --wire-breaking-border: #f9c6cf;
    
    /* Category colors */
    --wire-tech: #7856ff;
    --wire-finance: #00ba7c;
    --wire-culture: #f91880;
    --wire-science: #ff7a00;
    --wire-politics: #1d9bf0;
    --wire-space: #794bc4;
    --wire-world: #536471;
    
    /* Sidebar widths */
    --wire-sidebar-left: 275px;
    --wire-sidebar-right: 350px;
    --wire-main-max: 600px;
    
    /* Glassmorphism */
    --wire-glass-bg: rgba(255, 255, 255, 0.8);
    --wire-glass-blur: 12px;
    --wire-glass-border: rgba(255, 255, 255, 0.4);
    
    /* Soft gradients */
    --wire-gradient-subtle: linear-gradient(180deg, rgba(247, 249, 250, 0) 0%, rgba(247, 249, 250, 1) 100%);
    --wire-gradient-glow: radial-gradient(ellipse at center, rgba(0, 212, 255, 0.08) 0%, transparent 70%);
}

/* ===== WIRE THREE-COLUMN LAYOUT ===== */
.wire-layout {
    display: flex;
    min-height: 100vh;
    background: var(--wire-bg);
}

.wire-sidebar-left {
    width: var(--wire-sidebar-left);
    flex-shrink: 0;
    position: sticky;
    top: 56px;
    height: calc(100vh - 56px);
    border-right: 1px solid var(--wire-border);
    background: var(--wire-bg);
    display: flex;
    flex-direction: column;
    padding: 0 12px;
    overflow-y: auto;
}

.wire-main {
    flex: 1;
    max-width: var(--wire-main-max);
    min-width: 0;
    border-right: 1px solid var(--wire-border);
}

.wire-sidebar-right {
    width: var(--wire-sidebar-right);
    flex-shrink: 0;
    position: sticky;
    top: 56px;
    height: calc(100vh - 56px);
    padding: 12px 24px;
    overflow-y: auto;
    background: var(--wire-bg);
}

/* ===== WIRE LOGO/BRAND ===== */
.wire-brand {
    padding: 16px 12px;
    margin-bottom: 8px;
}

.wire-brand-logo {
    font-family: var(--acutus-font-family);
    font-size: 28px;
    font-weight: 800;
    color: var(--wire-text-primary);
    letter-spacing: -0.5px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.wire-brand-logo:hover {
    color: var(--acutus-primary);
}

.wire-brand-accent {
    width: 4px;
    height: 28px;
    background: var(--acutus-primary);
    border-radius: 2px;
}

/* ===== WIRE NAVIGATION ===== */
.wire-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 0;
    margin: 0;
    list-style: none;
}

.wire-nav-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 12px 12px;
    border-radius: 9999px;
    color: var(--wire-text-primary);
    text-decoration: none;
    font-size: 20px;
    font-weight: 400;
    transition: all 0.2s ease;
}

.wire-nav-item:hover {
    background: var(--wire-bg-hover);
}

.wire-nav-item.active {
    font-weight: 700;
}

.wire-nav-item i {
    font-size: 26px;
    width: 26px;
    text-align: center;
}

.wire-nav-icon {
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Collapsed nav for mobile */
@media (max-width: 1280px) {
    .wire-sidebar-left {
        width: 88px;
        padding: 0 12px;
    }
    
    .wire-nav-item span {
        display: none;
    }
    
    .wire-nav-item {
        justify-content: center;
        padding: 12px;
    }
    
    .wire-brand-logo span {
        display: none;
    }
}

/* ===== WIRE CTA BUTTON ===== */
.wire-cta-btn {
    width: 100%;
    padding: 16px 32px;
    background: var(--acutus-primary);
    color: var(--acutus-dark-900);
    font-size: 17px;
    font-weight: 700;
    border: none;
    border-radius: 9999px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 16px;
}

.wire-cta-btn:hover {
    background: var(--acutus-primary-hover);
    transform: scale(1.02);
}

@media (max-width: 1280px) {
    .wire-cta-btn {
        width: 52px;
        height: 52px;
        padding: 0;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .wire-cta-btn span {
        display: none;
    }
    
    .wire-cta-btn i {
        display: block !important;
    }
}

/* ===== WIRE HEADER ===== */
.wire-header {
    position: sticky;
    top: 0;
    background: var(--wire-glass-bg);
    backdrop-filter: blur(var(--wire-glass-blur));
    -webkit-backdrop-filter: blur(var(--wire-glass-blur));
    border-bottom: 1px solid var(--wire-border);
    z-index: 100;
    padding: 0 16px;
}

.wire-header-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--wire-text-primary);
    padding: 16px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.wire-header-icon {
    width: 34px;
    height: 34px;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--wire-text-primary);
    cursor: pointer;
    transition: background 0.2s;
}

.wire-header-icon:hover {
    background: var(--wire-bg-hover);
}

/* ===== WIRE CATEGORY TABS ===== */
.wire-tabs {
    display: flex;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    border-bottom: 1px solid var(--wire-border);
}

.wire-tabs::-webkit-scrollbar {
    display: none;
}

.wire-tab {
    flex: 1;
    min-width: fit-content;
    padding: 16px 16px;
    font-size: 15px;
    font-weight: 500;
    color: var(--wire-text-secondary);
    text-align: center;
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.wire-tab:hover {
    background: var(--wire-bg-hover);
    color: var(--wire-text-primary);
}

.wire-tab.active {
    color: var(--wire-text-primary);
    font-weight: 700;
    border-bottom-color: var(--acutus-primary);
}

.wire-tab-icon {
    font-size: 16px;
}

/* ===== WIRE FEED CARD ===== */
.wire-card {
    padding: 16px;
    border-bottom: 1px solid var(--wire-border);
    transition: background 0.2s;
    cursor: pointer;
}

.wire-card:hover {
    background: var(--wire-bg-hover);
}

.wire-card-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 4px;
}

.wire-avatar {
    width: 40px;
    height: 40px;
    border-radius: 9999px;
    background: var(--wire-bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    color: white;
    flex-shrink: 0;
}

.wire-avatar.tech { background: var(--wire-tech); }
.wire-avatar.finance { background: var(--wire-finance); }
.wire-avatar.culture { background: var(--wire-culture); }
.wire-avatar.science { background: var(--wire-science); }
.wire-avatar.politics { background: var(--wire-politics); }
.wire-avatar.space { background: var(--wire-space); }
.wire-avatar.world { background: var(--wire-world); }

.wire-card-content {
    flex: 1;
    min-width: 0;
}

.wire-card-meta {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
    font-size: 15px;
    line-height: 20px;
    margin-bottom: 4px;
}

.wire-author {
    font-weight: 700;
    color: var(--wire-text-primary);
}

.wire-author-handle {
    color: var(--wire-text-secondary);
}

.wire-verified {
    color: var(--acutus-primary);
    font-size: 16px;
}

.wire-separator {
    color: var(--wire-text-secondary);
}

.wire-time {
    color: var(--wire-text-secondary);
}

.wire-card-actions-top {
    margin-left: auto;
    color: var(--wire-text-secondary);
    padding: 8px;
    border-radius: 9999px;
    cursor: pointer;
}

.wire-card-actions-top:hover {
    background: rgba(29, 155, 240, 0.1);
    color: var(--wire-link);
}

/* Category badge */
.wire-category {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 8px;
}

.wire-category.tech { background: rgba(120, 86, 255, 0.1); color: var(--wire-tech); }
.wire-category.finance { background: rgba(0, 186, 124, 0.1); color: var(--wire-finance); }
.wire-category.culture { background: rgba(249, 24, 128, 0.1); color: var(--wire-culture); }
.wire-category.science { background: rgba(255, 122, 0, 0.1); color: var(--wire-science); }
.wire-category.politics { background: rgba(29, 155, 240, 0.1); color: var(--wire-politics); }
.wire-category.space { background: rgba(121, 75, 196, 0.1); color: var(--wire-space); }
.wire-category.world { background: rgba(83, 100, 113, 0.1); color: var(--wire-world); }

.wire-category-icon {
    font-size: 12px;
}

.wire-read-time {
    color: var(--wire-text-secondary);
    font-size: 13px;
    font-weight: 400;
    margin-left: 8px;
}

/* Headline */
.wire-headline {
    font-size: 18px;
    font-weight: 700;
    color: var(--wire-text-primary);
    line-height: 1.3;
    margin-bottom: 4px;
}

.wire-headline a {
    color: inherit;
    text-decoration: none;
}

.wire-headline a:hover {
    text-decoration: underline;
}

/* Excerpt */
.wire-excerpt {
    font-size: 15px;
    color: var(--wire-text-secondary);
    line-height: 1.5;
    margin-bottom: 12px;
}

/* Breaking badge */
.wire-breaking {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: var(--wire-breaking-bg);
    color: var(--wire-breaking-text);
    font-size: 12px;
    font-weight: 700;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.wire-breaking-dot {
    width: 6px;
    height: 6px;
    background: var(--wire-breaking-text);
    border-radius: 50%;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Card actions */
.wire-card-actions {
    display: flex;
    align-items: center;
    gap: 0;
    margin-top: 12px;
    margin-left: -8px;
}

.wire-action {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    color: var(--wire-text-secondary);
    font-size: 13px;
    border-radius: 9999px;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.wire-action:hover {
    color: var(--wire-link);
    background: rgba(29, 155, 240, 0.1);
}

.wire-action i {
    font-size: 18px;
}

/* ===== WIRE RIGHT SIDEBAR ===== */
.wire-search {
    margin-bottom: 16px;
}

.wire-search-input {
    width: 100%;
    padding: 12px 16px 12px 44px;
    background: var(--wire-bg-secondary);
    border: 1px solid transparent;
    border-radius: 9999px;
    font-size: 15px;
    color: var(--wire-text-primary);
    transition: all 0.2s;
}

.wire-search-input:focus {
    outline: none;
    background: var(--wire-bg);
    border-color: var(--acutus-primary);
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
}

.wire-search-wrapper {
    position: relative;
}

.wire-search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--wire-text-secondary);
    font-size: 16px;
}

/* Trending section */
.wire-trending {
    background: var(--wire-bg-secondary);
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 16px;
}

.wire-trending-header {
    padding: 12px 16px;
    font-size: 20px;
    font-weight: 800;
    color: var(--wire-text-primary);
}

.wire-trending-item {
    padding: 12px 16px;
    cursor: pointer;
    transition: background 0.2s;
}

.wire-trending-item:hover {
    background: var(--wire-bg-hover);
}

.wire-trending-category {
    font-size: 13px;
    color: var(--wire-text-secondary);
    margin-bottom: 2px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.wire-trending-live {
    color: var(--wire-breaking-text);
    font-weight: 700;
}

.wire-trending-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--wire-text-primary);
    line-height: 1.3;
    margin-bottom: 2px;
}

.wire-trending-count {
    font-size: 13px;
    color: var(--wire-text-secondary);
}

.wire-trending-more {
    padding: 16px;
    color: var(--acutus-primary);
    font-size: 15px;
    cursor: pointer;
    transition: background 0.2s;
}

.wire-trending-more:hover {
    background: var(--wire-bg-hover);
}

/* Who to follow section */
.wire-follow {
    background: var(--wire-bg-secondary);
    border-radius: 16px;
    overflow: hidden;
}

.wire-follow-header {
    padding: 12px 16px;
    font-size: 20px;
    font-weight: 800;
    color: var(--wire-text-primary);
}

.wire-follow-item {
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: background 0.2s;
}

.wire-follow-item:hover {
    background: var(--wire-bg-hover);
}

.wire-follow-avatar {
    width: 40px;
    height: 40px;
    border-radius: 9999px;
    background: var(--acutus-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    color: var(--acutus-dark-900);
    flex-shrink: 0;
}

.wire-follow-info {
    flex: 1;
    min-width: 0;
}

.wire-follow-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--wire-text-primary);
    display: flex;
    align-items: center;
    gap: 4px;
}

.wire-follow-handle {
    font-size: 14px;
    color: var(--wire-text-secondary);
}

.wire-follow-btn {
    padding: 8px 16px;
    background: var(--wire-text-primary);
    color: var(--wire-bg);
    font-size: 14px;
    font-weight: 700;
    border: none;
    border-radius: 9999px;
    cursor: pointer;
    transition: all 0.2s;
}

.wire-follow-btn:hover {
    background: var(--wire-text-secondary);
}

/* Footer */
.wire-footer {
    padding: 16px;
    font-size: 13px;
    color: var(--wire-text-secondary);
}

.wire-footer a {
    color: var(--wire-text-secondary);
    text-decoration: none;
    margin-right: 12px;
}

.wire-footer a:hover {
    text-decoration: underline;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .wire-sidebar-right {
        display: none;
    }
}

@media (max-width: 768px) {
    .wire-sidebar-left {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        top: auto;
        height: auto;
        width: 100%;
        flex-direction: row;
        justify-content: space-around;
        padding: 8px 0;
        border-right: none;
        border-top: 1px solid var(--wire-border);
        background: var(--wire-glass-bg);
        backdrop-filter: blur(var(--wire-glass-blur));
        z-index: 1000;
    }
    
    .wire-nav {
        flex-direction: row;
        justify-content: space-around;
        width: 100%;
    }
    
    .wire-nav-item {
        flex-direction: column;
        gap: 4px;
        padding: 8px 16px;
        font-size: 10px;
    }
    
    .wire-nav-item i {
        font-size: 24px;
    }
    
    .wire-brand,
    .wire-cta-btn {
        display: none;
    }
    
    .wire-main {
        max-width: 100%;
        padding-bottom: 70px;
    }
}

/* ===== GLASSMORPHISM EFFECTS ===== */
.wire-glass-panel {
    background: var(--wire-glass-bg);
    backdrop-filter: blur(var(--wire-glass-blur));
    -webkit-backdrop-filter: blur(var(--wire-glass-blur));
    border: 1px solid var(--wire-glass-border);
    border-radius: 16px;
}

/* ===== SOFT GRADIENT BACKGROUNDS ===== */
.wire-gradient-glow {
    background: var(--wire-gradient-glow);
}

/* ===== EMPTY STATE ===== */
.wire-empty {
    padding: 48px 24px;
    text-align: center;
}

.wire-empty-icon {
    font-size: 48px;
    color: var(--wire-text-secondary);
    margin-bottom: 16px;
}

.wire-empty-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--wire-text-primary);
    margin-bottom: 8px;
}

.wire-empty-text {
    font-size: 15px;
    color: var(--wire-text-secondary);
}

/* ===== FOCUS STYLES FOR ACCESSIBILITY ===== */
.wire-tab:focus,
.wire-action:focus,
.wire-nav-item:focus,
.wire-card-actions-top:focus,
.wire-cta-btn:focus,
.wire-follow-btn:focus,
.wire-trending-more:focus {
    outline: 2px solid var(--acutus-primary);
    outline-offset: 2px;
}

.wire-tab:focus:not(:focus-visible),
.wire-action:focus:not(:focus-visible),
.wire-nav-item:focus:not(:focus-visible),
.wire-card-actions-top:focus:not(:focus-visible),
.wire-cta-btn:focus:not(:focus-visible),
.wire-follow-btn:focus:not(:focus-visible),
.wire-trending-more:focus:not(:focus-visible) {
    outline: none;
}

.wire-headline a:focus {
    outline: 2px solid var(--acutus-primary);
    outline-offset: 2px;
    text-decoration: underline;
}

/* ===== LOADING SKELETON ===== */
.wire-skeleton {
    background: linear-gradient(90deg, var(--wire-bg-secondary) 25%, var(--wire-bg-hover) 50%, var(--wire-bg-secondary) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.wire-skeleton-avatar {
    width: 40px;
    height: 40px;
    border-radius: 9999px;
}

.wire-skeleton-text {
    height: 16px;
    margin-bottom: 8px;
}

.wire-skeleton-text.short {
    width: 60%;
}

.wire-skeleton-text.medium {
    width: 80%;
}

.wire-skeleton-headline {
    height: 24px;
    width: 90%;
    margin-bottom: 12px;
}
