/* CS Detail Page Styles */

/* Layout */
.cs-detail-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 2rem;
}

/* Main Content */
.cs-detail-main {
    min-width: 0;
}

.cs-detail-container {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
}

/* Skeleton Loading */
.cs-detail-skeleton {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 3rem;
}

.skeleton-badge,
.skeleton-title,
.skeleton-meta,
.skeleton-text,
.skeleton-divider {
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.skeleton-badge {
    width: 80px;
    height: 24px;
    border-radius: 12px;
}

.skeleton-title {
    width: 70%;
    height: 32px;
    margin-top: 1rem;
}

.skeleton-meta {
    width: 150px;
    height: 20px;
    margin-bottom: 2rem;
}

.skeleton-divider {
    width: 100%;
    height: 1px;
    margin: 2rem 0;
}

.skeleton-text {
    width: 100%;
    height: 20px;
}

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

/* Header */
.cs-detail-header {
    padding: 3rem 3rem 2rem;
    background: linear-gradient(180deg, #f8fafc 0%, white 100%);
    border-bottom: 1px solid #e9ecef;
}

.cs-detail-badge {
    display: inline-block;
    padding: 0.375rem 0.875rem;
    border-radius: 6px;
    font-size: 0.8125rem;
    font-weight: 600;
    background: #1a202c;
    color: white;
    margin-bottom: 1rem;
}

.cs-detail-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1a202c;
    margin: 0 0 1rem 0;
    line-height: 1.4;
}

.cs-detail-meta {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.cs-detail-meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #64748b;
    font-size: 0.9375rem;
}

.cs-detail-meta-item i {
    font-size: 1rem;
}

/* Content Body */
.cs-detail-body {
    padding: 3rem;
}

.cs-detail-content {
    font-size: 1rem;
    line-height: 1.8;
    color: #475569;
}

.cs-detail-content h1,
.cs-detail-content h2,
.cs-detail-content h3 {
    color: #1a202c;
    font-weight: 700;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.cs-detail-content h1 { font-size: 1.75rem; }
.cs-detail-content h2 { font-size: 1.5rem; }
.cs-detail-content h3 { font-size: 1.25rem; }

.cs-detail-content p {
    margin-bottom: 1rem;
}

.cs-detail-content ul,
.cs-detail-content ol {
    margin-bottom: 1rem;
    padding-left: 2rem;
}

.cs-detail-content li {
    margin-bottom: 0.5rem;
}

.cs-detail-content a {
    color: #4A9F40;
    text-decoration: underline;
}

.cs-detail-content a:hover {
    color: #2d7a26;
}

.cs-detail-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1.5rem 0;
}

.cs-detail-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
}

.cs-detail-content th,
.cs-detail-content td {
    padding: 0.75rem 1rem;
    border: 1px solid #e2e8f0;
}

.cs-detail-content th {
    background: #f8fafc;
    font-weight: 600;
    color: #475569;
}

/* Footer */
.cs-detail-footer {
    padding: 2rem 3rem;
    border-top: 1px solid #e9ecef;
    background: #f8fafc;
}

.cs-detail-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    color: #475569;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
}

.cs-detail-button:hover {
    background: #1a202c;
    border-color: #1a202c;
    color: white;
}

/* Sidebar */
.cs-detail-sidebar {
    position: sticky;
    top: 2rem;
    height: fit-content;
}

.cs-sidebar-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.5rem;
}

.cs-sidebar-title {
    font-size: 1rem;
    font-weight: 700;
    color: #1a202c;
    margin: 0 0 1rem 0;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #f1f5f9;
}

.cs-sidebar-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.cs-sidebar-item {
    display: block;
    padding: 0.75rem;
    background: #f8fafc;
    border-radius: 6px;
    text-decoration: none;
    color: #475569;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    border-left: 2px solid transparent;
}

.cs-sidebar-item:hover {
    background: #f1f5f9;
    border-left-color: #4A9F40;
    color: #1a202c;
}

.cs-sidebar-item-title {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.cs-sidebar-item-date {
    font-size: 0.75rem;
    color: #94a3b8;
}

.skeleton-sidebar-item {
    height: 60px;
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 6px;
    margin-bottom: 0.75rem;
}

/* Responsive */
@media (max-width: 1024px) {
    .cs-detail-layout {
        grid-template-columns: 1fr;
    }

    .cs-detail-sidebar {
        position: static;
        margin-top: 2rem;
    }
}

@media (max-width: 768px) {
    .cs-detail-header,
    .cs-detail-body,
    .cs-detail-footer {
        padding: 2rem 1.5rem;
    }

    .cs-detail-title {
        font-size: 1.5rem;
    }

    .cs-detail-skeleton {
        padding: 2rem 1.5rem;
    }
}
