/* Content Formatter Styles - HomelyPet Inspired */

.capri-reading-time {
    display: inline-block;
    background: #f0f0f1;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    color: #666;
    margin-bottom: 24px;
}

/* Article Overview */
.capri-article-overview {
    background: linear-gradient(135deg, #fff8f5 0%, #fff 100%);
    border: 2px solid #FF6B35;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 32px;
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.overview-icon {
    font-size: 36px;
    flex-shrink: 0;
}

.overview-content h3 {
    font-size: 18px;
    font-weight: 700;
    color: #FF6B35;
    margin: 0 0 12px;
}

.overview-content p {
    font-size: 15px;
    color: #333;
    line-height: 1.7;
    margin: 0;
}

/* Table of Contents */
.capri-toc-wrapper {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-left: 4px solid #FF6B35;
    border-radius: 8px;
    padding: 24px 28px;
    margin-bottom: 40px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.capri-toc-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    cursor: pointer;
    padding-bottom: 12px;
    border-bottom: 1px solid #f0f0f0;
}

.toc-icon {
    font-size: 22px;
}

.capri-toc-header h3 {
    flex: 1;
    font-size: 18px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0;
}

.toc-toggle {
    background: none;
    border: none;
    font-size: 16px;
    color: #666;
    cursor: pointer;
    padding: 4px 8px;
    transition: transform 0.3s ease;
}

.toc-toggle.active {
    transform: rotate(180deg);
}

.capri-toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
    counter-reset: toc-counter;
}

.capri-toc-list li {
    margin: 0;
    padding: 0;
}

.capri-toc-list li.toc-h2 {
    margin-bottom: 4px;
    counter-increment: toc-counter;
}

.capri-toc-list li.toc-h3 {
    padding-left: 28px;
    margin-bottom: 2px;
}

.capri-toc-list a {
    display: block;
    padding: 8px 12px;
    color: #555;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.2s ease;
    font-size: 15px;
    line-height: 1.4;
}

.capri-toc-list li.toc-h2 > a {
    font-weight: 600;
    color: #333;
}

.capri-toc-list li.toc-h2 > a::before {
    content: counter(toc-counter) ". ";
    color: #FF6B35;
    font-weight: 700;
}

.capri-toc-list li.toc-h3 > a {
    font-weight: 400;
    font-size: 14px;
    color: #666;
    padding: 5px 12px;
}

.capri-toc-list a:hover {
    background: #fff5f0;
    color: #FF6B35;
}

.capri-toc-list a.active {
    background: #fff5f0;
    color: #FF6B35;
    font-weight: 700;
}

/* Formatted Content Styling */
.capri-formatted-content h2 {
    font-size: 26px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 40px 0 20px;
    padding-bottom: 12px;
    border-bottom: 3px solid #FF6B35;
    scroll-margin-top: 100px; /* For smooth scroll with fixed headers */
}

.capri-formatted-content h3 {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    margin: 32px 0 16px;
    scroll-margin-top: 100px;
}

.capri-formatted-content p {
    font-size: 16px;
    line-height: 1.8;
    color: #333;
    margin-bottom: 20px;
}

.capri-formatted-content ul,
.capri-formatted-content ol {
    margin: 20px 0;
    padding-left: 24px;
}

.capri-formatted-content li {
    font-size: 16px;
    line-height: 1.8;
    color: #333;
    margin-bottom: 12px;
}

.capri-formatted-content strong {
    color: #1a1a1a;
    font-weight: 700;
}

.capri-formatted-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 24px 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.capri-formatted-content table thead {
    background: linear-gradient(135deg, #FF6B35 0%, #ff5722 100%);
    color: #fff;
}

.capri-formatted-content table th {
    padding: 16px;
    text-align: left;
    font-weight: 700;
    font-size: 15px;
}

.capri-formatted-content table td {
    padding: 14px 16px;
    border-bottom: 1px solid #e5e5e5;
    font-size: 15px;
    color: #333;
}

.capri-formatted-content table tr:nth-child(even) {
    background: #f8f9fa;
}

.capri-formatted-content table tbody tr:hover {
    background: #eef2f7;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .capri-article-overview {
        flex-direction: column;
        padding: 20px;
    }

    .overview-icon {
        font-size: 28px;
    }

    .capri-toc-wrapper {
        padding: 20px;
    }

    .capri-formatted-content h2 {
        font-size: 22px;
    }

    .capri-formatted-content h3 {
        font-size: 18px;
    }

    .capri-formatted-content p,
    .capri-formatted-content li {
        font-size: 15px;
    }

    .capri-formatted-content table {
        font-size: 13px;
    }

    .capri-formatted-content table th,
    .capri-formatted-content table td {
        padding: 10px 12px;
    }
}
