/* Homepage Widgets - Light/Dark Theme Support
   These styles previously hardcoded dark colors; now use CSS variables for proper theming */

/* CVE Search Compact */
.cve-search-compact {
    background: var(--color-bg-secondary);
    border-radius: 1rem;
    padding: 2rem;
    border: 1px solid var(--color-border);
    box-shadow: var(--box-shadow);
}

[data-theme="dark"] .cve-search-compact {
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
    border: 1px solid rgba(139, 92, 246, 0.3);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.cve-search-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.cve-search-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #9333ea;
    margin-bottom: 0.5rem;
}

[data-theme="dark"] .cve-search-title {
    color: #e879f9;
}

.cve-search-subtitle {
    color: var(--color-text-secondary);
    font-size: 0.95rem;
    margin: 0;
}

.cve-search-body {
    max-width: 700px;
    margin: 0 auto;
}

.cve-search-input-group {
    display: flex;
    gap: 0;
    margin-bottom: 1rem;
}

.cve-search-input {
    flex: 1;
    background: var(--color-bg-content);
    border: 2px solid #f97316;
    border-right: none;
    border-radius: 0.5rem 0 0 0.5rem;
    padding: 0.875rem 1.25rem;
    color: var(--color-text-primary);
    font-size: 1rem;
    outline: none;
    transition: all 0.2s ease;
}

[data-theme="dark"] .cve-search-input {
    background: #0f172a;
    color: #e5e7eb;
}

.cve-search-input::placeholder {
    color: var(--color-text-muted);
}

.cve-search-input:focus {
    border-color: #fb923c;
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.1);
}

.cve-search-btn {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    border: 2px solid #f97316;
    border-left: none;
    border-radius: 0 0.5rem 0.5rem 0;
    color: white;
    padding: 0.875rem 2rem;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.cve-search-btn:hover {
    background: linear-gradient(135deg, #fb923c 0%, #f97316 100%);
    transform: translateX(-2px);
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.4);
}

.cve-search-examples {
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.cve-search-examples span {
    color: var(--color-text-secondary);
    font-size: 0.875rem;
}

.cve-search-examples a {
    color: #f97316;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: color 0.2s ease;
}

.cve-search-examples a:hover {
    color: #fb923c;
    text-decoration: underline;
}

.cve-search-actions {
    margin-top: 1.5rem;
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.cve-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: rgba(249, 115, 22, 0.1);
    border: 2px solid rgba(249, 115, 22, 0.4);
    color: #ea580c;
    text-decoration: none;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

[data-theme="dark"] .cve-action-btn {
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.15) 0%, rgba(139, 92, 246, 0.15) 100%);
    color: #f97316;
}

.cve-action-btn:hover {
    background: rgba(249, 115, 22, 0.2);
    border-color: #f97316;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3);
    color: #f97316;
}

[data-theme="dark"] .cve-action-btn:hover {
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.25) 0%, rgba(139, 92, 246, 0.25) 100%);
    color: #fb923c;
}

/* Phoenix Vulnerability Weekly - Compact */
.phoenix-weekly-compact {
    background: var(--color-bg-secondary);
    border-radius: 1rem;
    padding: 1.5rem;
    border: 1px solid var(--color-border);
    box-shadow: var(--box-shadow);
}

[data-theme="dark"] .phoenix-weekly-compact {
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
    border: 1px solid rgba(249, 115, 22, 0.3);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.phoenix-weekly-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--color-border);
}

[data-theme="dark"] .phoenix-weekly-header {
    border-bottom-color: rgba(249, 115, 22, 0.2);
}

.phoenix-weekly-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #ea580c;
    margin: 0;
}

[data-theme="dark"] .phoenix-weekly-title {
    color: #f97316;
}

.phoenix-weekly-badge {
    background: rgba(249, 115, 22, 0.15);
    color: #ea580c;
    padding: 0.25rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 600;
}

[data-theme="dark"] .phoenix-weekly-badge {
    color: #f97316;
}

.phoenix-article-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem;
    background: var(--color-bg-content);
    border-radius: 0.5rem;
    margin-bottom: 0.5rem;
    border: 1px solid var(--color-border);
    transition: all 0.2s ease;
    text-decoration: none;
    color: inherit;
}

[data-theme="dark"] .phoenix-article-item {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(75, 85, 99, 0.3);
}

.phoenix-article-item:hover {
    background: var(--color-bg-hover);
    border-color: rgba(249, 115, 22, 0.5);
    transform: translateX(4px);
}

[data-theme="dark"] .phoenix-article-item:hover {
    background: rgba(15, 23, 42, 0.9);
}

.phoenix-article-arrow {
    color: #f97316;
    font-weight: 700;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.phoenix-article-content {
    flex: 1;
    min-width: 0;
}

.phoenix-article-title {
    color: var(--color-text-primary);
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
    line-height: 1.4;
}

[data-theme="dark"] .phoenix-article-title {
    color: #e5e7eb;
}

.phoenix-article-cves {
    color: var(--color-text-muted);
    font-size: 0.75rem;
}

.phoenix-weekly-footer {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--color-border);
    text-align: center;
}

[data-theme="dark"] .phoenix-weekly-footer {
    border-top-color: rgba(249, 115, 22, 0.2);
}

.phoenix-weekly-links {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.phoenix-weekly-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.25rem;
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    color: white;
    text-decoration: none;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(249, 115, 22, 0.3);
}

.phoenix-weekly-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.5);
    color: white;
}

/* HP Intel Cards */
.hp-intel-card {
    background: var(--color-bg-content);
    border-radius: 0.75rem;
    border: 1px solid var(--color-border);
    position: relative;
}

[data-theme="dark"] .hp-intel-card {
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
    border: 1px solid rgba(139, 92, 246, 0.3);
}

.hp-intel-header {
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--color-border);
    border-radius: 0.75rem 0.75rem 0 0;
    overflow: visible;
}

[data-theme="dark"] .hp-intel-header {
    border-bottom-color: rgba(139, 92, 246, 0.2);
}

.hp-intel-title {
    font-size: 0.9rem;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--color-text-primary);
}

.hp-intel-badge {
    font-size: 0.7rem;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-weight: 700;
}

.hp-intel-header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.hp-intel-sort {
    font-size: 0.65rem;
    padding: 0.2rem 0.35rem;
    border-radius: 0.25rem;
    border: 1px solid var(--color-border);
    background: var(--color-bg-secondary);
    color: var(--color-text-primary);
    max-width: 8.5rem;
    cursor: pointer;
}

[data-theme="dark"] .hp-intel-sort {
    border: 1px solid rgba(139, 92, 246, 0.35);
    background: rgba(17, 24, 39, 0.9);
    color: #e5e7eb;
}

.hp-intel-sort:focus {
    outline: 2px solid rgba(168, 85, 247, 0.5);
    outline-offset: 1px;
}

.hp-intel-table {
    width: 100%;
    font-size: 0.75rem;
}

.hp-intel-table th {
    padding: 0.5rem 0.75rem;
    text-align: left;
    color: var(--color-text-secondary);
    font-weight: 600;
    border-bottom: 1px solid var(--color-border);
    font-size: 0.7rem;
}

[data-theme="dark"] .hp-intel-table th {
    color: #9ca3af;
    border-bottom-color: rgba(139, 92, 246, 0.1);
}

.hp-intel-table td {
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid var(--color-border-light);
    color: var(--color-text-primary);
}

[data-theme="dark"] .hp-intel-table td {
    border-bottom-color: rgba(139, 92, 246, 0.05);
}

.hp-intel-table tr:last-child td {
    border-bottom: none;
}

.hp-intel-table tr:hover {
    background: var(--color-bg-hover);
}

[data-theme="dark"] .hp-intel-table tr:hover {
    background: rgba(139, 92, 246, 0.05);
}

.hp-cve-link {
    color: #7c3aed;
    text-decoration: none;
    font-weight: 600;
}

[data-theme="dark"] .hp-cve-link {
    color: #a855f7;
}

.hp-cve-link:hover {
    color: #9333ea;
    text-decoration: underline;
}

[data-theme="dark"] .hp-cve-link:hover {
    color: #c084fc;
}

.hp-severity-badge {
    font-size: 0.6rem;
    padding: 0.15rem 0.4rem;
    border-radius: 0.2rem;
    font-weight: 600;
    text-transform: uppercase;
}

.hp-severity-critical { background: #dc2626; color: white; }
.hp-severity-high { background: #ea580c; color: white; }
.hp-severity-medium { background: #ca8a04; color: white; }
.hp-severity-low { background: #16a34a; color: white; }

.hp-intel-footer {
    padding: 0.5rem 1rem;
    text-align: right;
    border-top: 1px solid var(--color-border);
}

[data-theme="dark"] .hp-intel-footer {
    border-top-color: rgba(139, 92, 246, 0.1);
}

.hp-intel-footer a {
    color: #7c3aed;
    font-size: 0.75rem;
    text-decoration: none;
    font-weight: 600;
}

[data-theme="dark"] .hp-intel-footer a {
    color: #a855f7;
}

.hp-intel-footer a:hover {
    color: #9333ea;
}

[data-theme="dark"] .hp-intel-footer a:hover {
    color: #c084fc;
}

.hp-kev-badge {
    background: #ef4444;
    color: white;
    font-size: 0.55rem;
    padding: 0.1rem 0.3rem;
    border-radius: 0.15rem;
    font-weight: 600;
    margin-left: 0.25rem;
}

.hp-ransomware-badge {
    background: #dc2626;
    color: white;
    font-size: 0.55rem;
    padding: 0.1rem 0.3rem;
    border-radius: 0.15rem;
    font-weight: 600;
    margin-left: 0.25rem;
}

.hp-score-bar {
    width: 40px;
    height: 6px;
    background: rgba(139, 92, 246, 0.15);
    border-radius: 3px;
    overflow: hidden;
    display: inline-block;
    vertical-align: middle;
}

[data-theme="dark"] .hp-score-bar {
    background: rgba(139, 92, 246, 0.2);
}

.hp-score-fill {
    height: 100%;
    border-radius: 3px;
}

.hp-tech-text {
    color: var(--color-text-muted);
    font-size: 0.65rem;
    max-width: 80px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hp-info-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: rgba(168, 85, 247, 0.15);
    color: #7c3aed;
    font-size: 0.55rem;
    font-weight: 700;
    cursor: help;
    margin-left: 4px;
    vertical-align: middle;
    position: relative;
}

[data-theme="dark"] .hp-info-icon {
    background: rgba(168, 85, 247, 0.2);
    color: #a855f7;
}

.hp-info-icon:hover {
    background: rgba(168, 85, 247, 0.35);
}

[data-theme="dark"] .hp-info-icon:hover {
    background: rgba(168, 85, 247, 0.5);
}

.hp-info-tooltip {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    width: 220px;
    padding: 0.5rem;
    background: var(--color-bg-content);
    border: 1px solid var(--color-border);
    border-radius: 6px;
    font-size: 0.65rem;
    font-weight: 400;
    color: var(--color-text-secondary);
    line-height: 1.4;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
    pointer-events: none;
    box-shadow: var(--box-shadow-lg);
    text-align: left;
    white-space: normal;
}

[data-theme="dark"] .hp-info-tooltip {
    background: #1f2937;
    border: 1px solid rgba(168, 85, 247, 0.4);
    color: #d1d5db;
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
}

.hp-info-icon:hover .hp-info-tooltip {
    opacity: 1;
    visibility: visible;
}

.hp-info-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: var(--color-border);
}

[data-theme="dark"] .hp-info-tooltip::after {
    border-top-color: rgba(168, 85, 247, 0.4);
}

/* Reference Intel Compact */
.reference-intel-compact {
    background: var(--color-bg-secondary);
    border-radius: 0.75rem;
    padding: 0.75rem 1rem;
    border: 1px solid var(--color-border);
}

[data-theme="dark"] .reference-intel-compact {
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

/* High Profile Intel Section Grid */
.high-profile-intel-section {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

@media (max-width: 768px) {
    .high-profile-intel-section {
        grid-template-columns: 1fr;
    }
    
    .cve-search-input-group {
        flex-direction: column;
    }
    
    .cve-search-input,
    .cve-search-btn {
        border-radius: 0.5rem;
        border: 2px solid #f97316;
    }
    
    .cve-search-actions {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .cve-action-btn {
        width: 100%;
        justify-content: center;
    }
    
    .phoenix-weekly-links {
        flex-direction: column;
    }
    
    .phoenix-weekly-link {
        width: 100%;
        justify-content: center;
    }
}
