/* Force Override Tailwind Typography for Lists and Tables */

/* Unordered Lists - Square Icons */
.prose ul,
.prose.article-content ul,
article.article-content.prose ul {
    list-style: none !important;
    list-style-type: none !important;
    padding-left: 0 !important;
    margin-left: 0 !important;
}

.prose ul li,
.prose.article-content ul li,
article.article-content.prose ul li,
.prose ul > li {
    list-style: none !important;
    list-style-type: none !important;
    list-style-image: none !important;
    padding-left: 1.75rem !important;
    position: relative !important;
    line-height: 1.8 !important;
}

.prose ul li::before,
.prose.article-content ul li::before,
article.article-content.prose ul li::before {
    content: "■" !important;
    position: absolute !important;
    left: 0 !important;
    top: 0.45rem !important;
    color: #2563eb !important;
    font-weight: 900 !important;
    font-size: 0.875rem !important;
    display: block !important;
    line-height: 1 !important;
}

/* Ordered Lists - Circular Number Badges */
.prose ol,
.prose.article-content ol {
    list-style: none !important;
    padding-left: 0 !important;
    counter-reset: custom-counter !important;
}

.prose ol li,
.prose.article-content ol li {
    counter-increment: custom-counter !important;
    padding-left: 2.25rem !important;
    position: relative !important;
    list-style: none !important;
}

.prose ol li::before,
.prose.article-content ol li::before {
    content: counter(custom-counter) !important;
    position: absolute !important;
    left: 0 !important;
    top: 0.15rem !important;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%) !important;
    color: white !important;
    width: 1.5rem !important;
    height: 1.5rem !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-weight: 700 !important;
    font-size: 0.75rem !important;
    box-shadow: 0 2px 4px rgba(37, 99, 235, 0.3) !important;
    line-height: 1.5rem !important;
}

/* Remove any icons from headings */
.prose h2::before,
.prose h2::after,
.prose.article-content h2::before,
.prose.article-content h2::after,
article.article-content.prose h2::before,
article.article-content.prose h2::after,
.prose h3::before,
.prose h3::after,
.prose.article-content h3::before,
.prose.article-content h3::after,
article.article-content.prose h3::before,
article.article-content.prose h3::after {
    content: none !important;
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    width: 0 !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    font-size: 0 !important;
}

/* Table of Contents - Remove ONLY arrow characters, keep styling */
.table-of-contents ul,
#toc-list {
    list-style: none !important;
    list-style-type: none !important;
    list-style-image: none !important;
}

.table-of-contents ul li,
#toc-list li {
    list-style: none !important;
    list-style-type: none !important;
    list-style-image: none !important;
}

/* Remove ONLY ::before and ::after pseudo-elements that contain arrows/bullets */
.table-of-contents ul li::before,
.table-of-contents ul li::after,
.table-of-contents li::before,
.table-of-contents li::after,
#toc-list li::before,
#toc-list li::after,
.table-of-contents ul li::marker,
.table-of-contents li::marker,
#toc-list li::marker {
    content: none !important;
    display: none !important;
}

/* Tables - Visible Columns and Responsive */
.prose table,
.prose.article-content table,
article.article-content.prose table {
    border-collapse: separate !important;
    border-spacing: 0 !important;
    border: 2px solid #cbd5e1 !important;
    display: table !important;
    width: 100% !important;
    min-width: 600px !important;
    font-size: 0.875rem !important;
    overflow: hidden !important;
}

.prose table td,
.prose.article-content table td,
article.article-content.prose table td {
    border-right: 1px solid #cbd5e1 !important;
    border-bottom: 1px solid #cbd5e1 !important;
    display: table-cell !important;
    padding: 0.75rem 0.5rem !important;
    vertical-align: top !important;
    word-wrap: break-word !important;
    white-space: normal !important;
}

.prose table th,
.prose.article-content table th,
article.article-content.prose table th {
    border-right: 2px solid rgba(255, 255, 255, 0.5) !important;
    border-bottom: 2px solid rgba(255, 255, 255, 0.5) !important;
    display: table-cell !important;
    padding: 0.875rem 0.5rem !important;
    vertical-align: middle !important;
    font-size: 0.8125rem !important;
    white-space: nowrap !important;
}

.prose table td:last-child,
.prose table th:last-child {
    border-right: none !important;
}

/* Table Wrapper for Responsive Design */
.article-content table,
.prose.article-content table,
article.article-content.prose table {
    margin: 0 !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

/* Table Container - Makes table scrollable on mobile */
.table-wrapper {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    margin: 0 !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding: 0 !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1) !important;
}

.table-wrapper table {
    margin: 0 !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

/* Responsive Table Styles */
@media (max-width: 768px) {
    .prose table,
    .prose.article-content table,
    article.article-content.prose table {
        font-size: 0.75rem !important;
        min-width: 500px !important;
    }
    
    .prose table th,
    .prose.article-content table th,
    article.article-content.prose table th {
        padding: 0.625rem 0.375rem !important;
        font-size: 0.6875rem !important;
    }
    
    .prose table td,
    .prose.article-content table td,
    article.article-content.prose table td {
        padding: 0.5rem 0.375rem !important;
    }
}

@media (max-width: 640px) {
    .prose table,
    .prose.article-content table,
    article.article-content.prose table {
        font-size: 0.6875rem !important;
        min-width: 450px !important;
    }
    
    .prose table th,
    .prose.article-content table th,
    article.article-content.prose table th {
        padding: 0.5rem 0.25rem !important;
        font-size: 0.625rem !important;
    }
    
    .prose table td,
    .prose.article-content table td,
    article.article-content.prose table td {
        padding: 0.5rem 0.25rem !important;
    }
}

