/* SEO Sidepanel Styles */

.seo-sidepanel {
    padding: 1.5rem 0;
}

/* Header */
.seo-sidepanel__header {
    margin-bottom: 1.25rem;
}

.seo-sidepanel__title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--w-color-text-label);
    margin: 0 0 0.375rem 0;
}

.seo-sidepanel__subtitle {
    font-size: 0.875rem;
    color: var(--w-color-text-meta);
    margin: 0;
}

.seo-sidepanel__audit-link {
    color: var(--w-color-text-link-default);
    text-decoration: none;
}

.seo-sidepanel__audit-link:hover {
    color: var(--w-color-text-link-hover);
    text-decoration: underline;
}

/* Summary */
.seo-sidepanel__summary {
    margin-bottom: 1.5rem;
}

.seo-sidepanel__summary-item {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    background: var(--w-color-surface-dashboard-panel);
    border: 1px solid var(--w-color-border-furniture);
    border-radius: 0.5rem;
}

.seo-sidepanel__summary-label {
    font-size: 0.9375rem;
    color: var(--w-color-text-label);
    font-weight: 500;
}

.seo-sidepanel__summary-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--w-color-text-label);
}

/* Issues Groups */
.seo-sidepanel__issues-group {
    margin-bottom: 1.5rem;
}

.seo-sidepanel__issues-group:last-child {
    margin-bottom: 0;
}

/* Severity Headers */
.seo-sidepanel__severity-header {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.625rem 1rem;
    border-radius: 0.375rem;
    margin-bottom: 0.75rem;
    cursor: pointer;
    list-style: none;
    user-select: none;
}

.seo-sidepanel__severity-header::-webkit-details-marker {
    display: none;
}

.seo-sidepanel__severity-header::marker {
    display: none;
}

.seo-sidepanel__severity-header::before {
    content: '▶';
    font-size: 0.625rem;
    color: var(--w-color-text-meta);
    display: inline-block;
}

.seo-sidepanel__issues-group[open] > .seo-sidepanel__severity-header::before {
    transform: rotate(90deg);
}

.seo-sidepanel__severity-header--critical {
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.1) 0%, rgba(220, 38, 38, 0.05) 100%);
    border: 1px solid rgba(220, 38, 38, 0.2);
}

.seo-sidepanel__severity-header--warning {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1) 0%, rgba(245, 158, 11, 0.05) 100%);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.seo-sidepanel__severity-header--suggestion {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(59, 130, 246, 0.05) 100%);
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.seo-sidepanel__severity-label {
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--w-color-text-label);
    flex: 1;
}

.seo-sidepanel__severity-count {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--w-color-grey-50);
    padding: 0.25rem 0.625rem;
    background: var(--w-color-surface-menus);
    border-radius: 0.25rem;
}

/* Issues List */
.seo-sidepanel__issues-list {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

/* Issue Cards */
.seo-sidepanel__issue-card {
    padding: 1rem;
    background: var(--w-color-surface-dashboard-panel);
    border-left: 3px solid var(--w-color-border-furniture);
    border-radius: 0.375rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.seo-sidepanel__issue-card--critical {
    border-left-color: rgba(220, 38, 38, 0.6);
    background: linear-gradient(90deg, rgba(220, 38, 38, 0.02) 0%, var(--w-color-surface-dashboard-panel) 15%);
}

.seo-sidepanel__issue-card--warning {
    border-left-color: rgba(245, 158, 11, 0.6);
    background: linear-gradient(90deg, rgba(245, 158, 11, 0.02) 0%, var(--w-color-surface-dashboard-panel) 15%);
}

.seo-sidepanel__issue-card--suggestion {
    border-left-color: rgba(59, 130, 246, 0.6);
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.02) 0%, var(--w-color-surface-dashboard-panel) 15%);
}

.seo-sidepanel__issue-type {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--w-color-text-label);
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.seo-sidepanel__issue-description {
    font-size: 0.875rem;
    color: var(--w-color-text-context);
    line-height: 1.5;
}

/* No Issues State */
.seo-sidepanel__no-issues {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem 1.5rem;
    text-align: center;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.05) 0%, rgba(34, 197, 94, 0.02) 100%);
    border: 1px solid rgba(34, 197, 94, 0.2);
    border-radius: 0.5rem;
}

.seo-sidepanel__no-issues-text {
    font-size: 0.9375rem;
    color: var(--w-color-text-label);
    margin: 0;
    font-weight: 500;
}

/* No Data State */
.seo-sidepanel__no-data {
    padding: 1.5rem 1.25rem;
    background: var(--w-color-surface-dashboard-panel);
    border: 1px solid var(--w-color-border-furniture);
    border-radius: 0.5rem;
}

.seo-sidepanel__no-data-text {
    font-size: 0.9375rem;
    color: var(--w-color-text-label);
    margin: 0 0 1rem 0;
    line-height: 1.5;
}

.seo-sidepanel__no-data-code {
    background: var(--w-color-surface-menus);
    border: 1px solid var(--w-color-border-furniture);
    border-radius: 0.375rem;
    padding: 0.875rem 1rem;
    font-size: 0.8125rem;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', monospace;
    color: var(--w-color-text-label);
    overflow-x: auto;
    margin: 0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .seo-sidepanel {
        padding: 1rem 0;
    }
    
    .seo-sidepanel__summary-item {
        padding: 0.875rem 1rem;
    }
    
    .seo-sidepanel__issue-card {
        padding: 0.875rem;
    }
    
    .seo-sidepanel__issue-type {
        font-size: 0.875rem;
    }
    
    .seo-sidepanel__issue-description {
        font-size: 0.8125rem;
    }
    
    .seo-sidepanel__severity-header {
        padding: 0.5rem 0.875rem;
    }
    
    .seo-sidepanel__no-issues {
        padding: 2rem 1.25rem;
    }
}
