/**
 * Media framing page styles
 */

.media-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--spacing-xl);
    padding-top: 100px;
    position: relative;
    z-index: 1;
}

.header {
    text-align: center;
    margin-bottom: var(--spacing-xl);
}

.header h1 {
    margin: 0 0 var(--spacing-sm) 0;
    font-size: var(--font-size-4xl);
    color: var(--color-neutral-900);
}

.header-intro {
    color: var(--color-neutral-600);
    font-size: var(--font-size-lg);
    max-width: 700px;
    margin: 0 auto var(--spacing-lg) auto;
    line-height: 1.6;
}

/* Custom Dropdown */
.custom-select {
    position: relative;
    min-width: 200px;
    max-width: 300px;
}

.custom-select-trigger {
    width: 100%;
    padding: var(--spacing-sm) var(--spacing-md);
    padding-right: 40px;
    border: 2px solid var(--color-neutral-300);
    border-radius: var(--border-radius);
    font-size: var(--font-size-base);
    background: white;
    cursor: pointer;
    text-align: left;
    transition: all 0.2s ease;
    color: var(--color-neutral-800);
}

.custom-select-trigger:hover {
    border-color: var(--color-neutral-400);
}

.custom-select-trigger:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.custom-select.open .custom-select-trigger {
    border-color: #6366f1;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.custom-select-arrow {
    position: absolute;
    right: var(--spacing-md);
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    transition: transform 0.2s ease;
    color: var(--color-neutral-500);
}

.custom-select.open .custom-select-arrow {
    transform: translateY(-50%) rotate(180deg);
}

.custom-select-options {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 2px solid #6366f1;
    border-top: none;
    border-radius: 0 0 var(--border-radius) var(--border-radius);
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

.custom-select.open .custom-select-options {
    display: block;
}

.custom-select-option {
    padding: var(--spacing-xs) var(--spacing-md);
    cursor: pointer;
    transition: all 0.15s ease;
    border-bottom: 1px solid var(--color-neutral-100);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    font-size: var(--font-size-sm);
}

.custom-select-option:last-child {
    border-bottom: none;
}

.custom-select-option:hover {
    background: #eef2ff;
}

.custom-select-option.selected {
    background: #6366f1;
    color: white;
}

.custom-select-option.selected:hover {
    background: #4f46e5;
}

.custom-select-options::-webkit-scrollbar {
    width: 8px;
}

.custom-select-options::-webkit-scrollbar-track {
    background: var(--color-neutral-100);
    border-radius: 4px;
}

.custom-select-options::-webkit-scrollbar-thumb {
    background: var(--color-neutral-300);
    border-radius: 4px;
}

.custom-select-options::-webkit-scrollbar-thumb:hover {
    background: var(--color-neutral-400);
}

.example-count {
    color: var(--color-neutral-600);
    font-size: var(--font-size-sm);
}

/* Issue Section */
.issue-section {
    margin-bottom: var(--spacing-2xl);
}

.issue-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-lg);
    flex-wrap: wrap;
    gap: var(--spacing-md);
}

.issue-title {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.issue-title h2 {
    margin: 0;
    font-size: var(--font-size-2xl);
    color: var(--color-neutral-900);
}

.issue-title h2 a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.issue-title h2 a:hover {
    color: #6366f1;
}

.issue-category-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: var(--font-size-sm);
    font-weight: 600;
    background: #e0e7ff;
    color: #3730a3;
    text-transform: capitalize;
}

/* Side-by-side comparison view */
.comparison-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-md);
}

.lean-column {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.lean-header {
    text-align: center;
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--border-radius);
    font-weight: 700;
    font-size: var(--font-size-sm);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.lean-header.left {
    background: #fee2e2;
    color: #991b1b;
}

.lean-header.center {
    background: #e0e7ff;
    color: #3730a3;
}

.lean-header.right {
    background: #dbeafe;
    color: #1e40af;
}

.framing-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: var(--border-radius-lg);
    padding: var(--spacing-lg);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    position: relative;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.framing-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
}

.framing-card.left::before {
    background: linear-gradient(90deg, #ef4444 0%, #f87171 100%);
}

.framing-card.center::before {
    background: linear-gradient(90deg, #6366f1 0%, #818cf8 100%);
}

.framing-card.right::before {
    background: linear-gradient(90deg, #3b82f6 0%, #60a5fa 100%);
}

.framing-source {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-sm);
}

.source-name {
    font-weight: 700;
    font-size: var(--font-size-sm);
    color: var(--color-neutral-700);
}

.lean-indicator {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: var(--font-size-xs);
    font-weight: 600;
    text-transform: capitalize;
}

.lean-indicator.left {
    background: #fee2e2;
    color: #991b1b;
}

.lean-indicator.center {
    background: #e0e7ff;
    color: #3730a3;
}

.lean-indicator.right {
    background: #dbeafe;
    color: #1e40af;
}

.framing-headline {
    font-weight: 700;
    font-size: var(--font-size-base);
    color: var(--color-neutral-900);
    margin: 0 0 var(--spacing-sm) 0;
    line-height: 1.4;
}

.framing-card-link {
    text-decoration: none;
    display: block;
    height: 100%;
}

.framing-card-link .framing-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.framing-card-link:hover .framing-card {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}

.framing-card-link:hover .framing-headline {
    color: #6366f1;
}

.framing-summary {
    color: var(--color-neutral-600);
    font-size: var(--font-size-sm);
    line-height: 1.6;
    margin: 0;
    flex-grow: 1;
}

.no-examples {
    text-align: center;
    padding: var(--spacing-lg);
    color: var(--color-neutral-500);
    font-style: italic;
}

.loading, .empty-state {
    text-align: center;
    padding: var(--spacing-2xl);
    background: rgba(255, 255, 255, 0.95);
    border-radius: var(--border-radius-lg);
    color: var(--color-neutral-600);
}

.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-md);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #d1fae5;
    border-top-color: #6366f1;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.empty-icon {
    font-size: 4rem;
    margin-bottom: var(--spacing-md);
    opacity: 0.5;
}

@media (max-width: 1024px) {
    .comparison-grid {
        grid-template-columns: 1fr;
    }

    .lean-column {
        border-bottom: 1px solid rgba(255, 255, 255, 0.2);
        padding-bottom: var(--spacing-lg);
    }

    .lean-column:last-child {
        border-bottom: none;
    }
}

@media (max-width: 768px) {
    .media-container {
        padding-top: 80px;
    }

    .filter-section {
        flex-direction: column;
        align-items: stretch;
    }

    .example-count {
        margin-left: 0;
        text-align: center;
    }

    .header h1 {
        font-size: var(--font-size-3xl);
    }

    .issue-header {
        flex-direction: column;
        align-items: flex-start;
    }
}
