/* Release Notes Detail Page Styles - Sumsub Inspired */

/* CSS Variables */
:root {
    --primary-color: #377cf7;
    --primary-hover: #2563eb;
    --text-primary: #1a1a1a;
    --text-secondary: #666666;
    --text-muted: #9ca3af;
    --border-color: #e5e7eb;
    --border-light: #f3f4f6;
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-badge-major: #dc2626;
    --bg-badge-feature: #059669;
    --bg-badge-ongoing: #d97706;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
}

/* Dark theme support */
body.dark {
    --text-primary: #ffffff;
    --text-secondary: #d1d5db;
    --text-muted: #9ca3af;
    --border-color: #374151;
    --border-light: #1f2937;
    --bg-primary: #111827;
    --bg-secondary: #1f2937;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
}

/* Base styles */
.changelog-detail {
    min-height: 100vh;
    background-color: var(--bg-primary);
    font-family: "Gilroy-Medium", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    padding: 60px 0 0px 0;
}

.changelog-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Header styles */
.changelog-header {
    margin-bottom: 3rem;
}

.changelog-breadcrumb {
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.breadcrumb-link {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

.breadcrumb-link:hover {
    color: var(--primary-hover);
}

.breadcrumb-separator {
    margin: 0 0.5rem;
    color: var(--text-muted);
}

.breadcrumb-current {
    color: var(--text-primary);
    font-weight: 500;
}

.changelog-title {
    font-family: "Gilroy-Semibold", sans-serif;
    font-size: 2.25rem;
    font-weight: 500;
    line-height: 1.2;
    color: var(--text-primary);
    margin: 0 0 1rem 0;
}

.changelog-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.changelog-date {
    color: var(--text-muted);
}

.changelog-author {
    color: var(--text-secondary);
}

/* Section styles */
.changelog-section {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    margin-bottom: 1.5rem;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.2s ease;
}

.changelog-section:hover {
    box-shadow: var(--shadow-md);
}

.changelog-section[open] {
    border-color: var(--primary-color);
}

/* Summary styles */
.changelog-summary {
    padding: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-light);
    transition: background-color 0.2s ease;
    list-style: none;
}

.changelog-summary::-webkit-details-marker {
    display: none;
}

.changelog-summary:hover {
    background: var(--border-light);
}

.summary-header {
    flex: 1;
}

.summary-title {
    font-family: "Gilroy-Semibold", sans-serif;
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--text-primary);
    margin: 0 0 0.5rem 0;
}

.summary-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.summary-date {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.summary-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: white;
}

.summary-badge--major {
    background-color: var(--bg-badge-major);
}

.summary-badge--feature {
    background-color: var(--bg-badge-feature);
}

.summary-badge--ongoing {
    background-color: var(--bg-badge-ongoing);
}

.summary-icon {
    margin-left: 1rem;
    color: var(--text-muted);
}

.chevron-icon {
    transition: transform 0.3s ease;
}

/* Content styles */
.changelog-section-content {
    padding: 2rem 1.5rem;
}

.update-group {
    margin-bottom: 2rem;
}

.update-group:last-child {
    margin-bottom: 0;
}

.update-category {
    font-family: "Gilroy-Semibold", sans-serif;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 1rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.update-category::before {
    content: '';
    width: 4px;
    height: 16px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    border-radius: 2px;
}

.update-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.update-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    margin-bottom: 0.5rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    border-left: 3px solid var(--primary-color);
    transition: all 0.2s ease;
}

.update-item:hover {
    background: var(--border-light);
    transform: translateX(2px);
}

.update-item:last-child {
    margin-bottom: 0;
}

.update-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
    margin-top: 0.125rem;
}

.update-content {
    flex: 1;
}

.update-content strong {
    font-family: "Gilroy-Semibold", sans-serif;
    font-weight: 500;
    color: var(--text-primary);
    display: block;
    margin-bottom: 0.25rem;
}

.update-content p {
    margin: 0;
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.5;
    text-align: justify;
}

/* Footer styles */
.changelog-footer {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.changelog-navigation {
    display: flex;
    justify-content: center;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem !important;
    color: var(--primary-color);
    text-decoration: none;
    border: 1px solid var(--primary-color);
    border-radius: var(--radius-md);
    font-weight: 500;
    transition: all 0.2s ease;
}

.nav-link:hover {
    background-color: var(--primary-color);
    color: white;
}

.nav-icon {
    flex-shrink: 0;
}

/* Responsive design */
@media (max-width: 768px) {
    .changelog-detail {
        padding: 1rem 0;
    }
    
    .changelog-container {
        padding: 0 1rem;
    }
    
    .changelog-title {
        font-size: 1.875rem;
    }
    
    .changelog-summary {
        padding: 1rem;
    }
    
    .changelog-section-content {
        padding: 1.5rem 1rem;
    }
    
    .summary-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .update-item {
        padding: 0.75rem;
    }
}

@media (max-width: 480px) {
    .changelog-title {
        font-size: 1.5rem;
    }
    
    .changelog-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .summary-title {
        font-size: 1.125rem;
    }
    
    .update-item {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .update-icon {
        align-self: flex-start;
    }
}

/* Print styles */
@media print {
    .changelog-detail {
        background: white;
        color: black;
    }
    
    .changelog-section {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ccc;
    }
    
    .changelog-summary {
        background: #f5f5f5;
    }
    
    .summary-icon {
        display: none;
    }
    
    .changelog-footer {
        display: none;
    }
}

/* Animation for details opening */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.changelog-section[open] .changelog-section-content {
    animation: slideDown 0.3s ease;
}