/**
 * WanAutomation — Article Content Styles
 * TOC, FAQ, and Heading defaults for generated articles.
 * Loaded via wp_enqueue_style on frontend single post pages.
 */

/* ============================================
   Smooth Scroll
   ============================================ */
html {
    scroll-behavior: smooth;
}

/* ============================================
   Table of Contents (TOC)
   ============================================ */
.wanaut-toc {
    margin: 1.5em 0 2em;
    border-radius: 12px;
    background: linear-gradient(135deg, #f8fafc, #eef2ff);
    border: 1px solid #e0e7ff;
}

.wanaut-toc details {
    margin: 0;
}

.wanaut-toc summary {
    cursor: pointer;
    padding: 1em 1.5em;
    font-size: 1.1em;
    font-weight: 700;
    color: #1e3a5f;
    display: flex;
    align-items: center;
    gap: 0.5em;
    list-style: none;
    user-select: none;
    border-bottom: 1px solid #e0e7ff;
    transition: background 0.2s ease;
}

.wanaut-toc summary::-webkit-details-marker {
    display: none;
}

.wanaut-toc summary:hover {
    background: #e0e7ff;
}

.wanaut-toc summary::after {
    content: "▼";
    font-size: 0.7em;
    margin-left: auto;
    transition: transform 0.3s ease;
    color: #6366f1;
}

.wanaut-toc details[open] summary::after {
    transform: rotate(180deg);
}

.wanaut-toc ol {
    margin: 0;
    padding: 1em 1.5em 1.2em 1.5em;
    list-style: none;
    counter-reset: toc-counter;
}

.wanaut-toc ol li {
    counter-increment: toc-counter;
    padding: 0.5em 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    gap: 0.6em;
}

.wanaut-toc ol li:last-child {
    border-bottom: none;
}

.wanaut-toc ol li::before {
    content: counter(toc-counter);
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    min-width: 28px;
    background: #6366f1;
    color: #fff;
    border-radius: 50%;
    font-size: 13px;
    font-weight: 700;
    line-height: 28px;
    text-align: center;
    display: inline-block;
}

.wanaut-toc ol li a {
    color: #374151;
    text-decoration: none;
    font-size: 0.95em;
    line-height: 1.5;
    transition: color 0.2s ease, padding-left 0.2s ease;
    display: block;
}

.wanaut-toc ol li a:hover {
    color: #6366f1;
    padding-left: 0.3em;
}

/* ============================================
   FAQ Accordion
   ============================================ */
.wanaut-faq {
    margin: 2.5em 0;
    padding: 0;
}

.wanaut-faq-header {
    display: flex;
    align-items: center;
    gap: 0.5em;
    margin-bottom: 1.2em;
    padding-bottom: 0.8em;
    border-bottom: 2px solid #e0e0e0;
}

.wanaut-faq-header h2 {
    margin: 0;
    font-size: 1.4em;
    color: #1a1a2e;
}

.wanaut-faq-item {
    margin-bottom: 0.6em;
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
    transition: box-shadow 0.2s ease;
}

.wanaut-faq-item:hover {
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.wanaut-faq-item details {
    margin: 0;
}

.wanaut-faq-item summary {
    cursor: pointer;
    padding: 1em 1.3em;
    font-weight: 600;
    font-size: 1.05em;
    color: #2c3e50;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1em;
    user-select: none;
    transition: background 0.2s ease;
}

.wanaut-faq-item summary::-webkit-details-marker {
    display: none;
}

.wanaut-faq-item summary::after {
    content: "+";
    font-size: 1.4em;
    font-weight: 300;
    color: #888;
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.wanaut-faq-item details[open] summary::after {
    content: "−";
    color: #3b82f6;
}

.wanaut-faq-item details[open] summary {
    background: #f0f7ff;
    color: #1e40af;
}

.wanaut-faq-answer {
    padding: 0 1.3em 1.2em;
    color: #555;
    line-height: 1.7;
    animation: wanautFaqFadeIn 0.3s ease;
}

.wanaut-faq-answer p {
    margin: 0.5em 0 0;
}

@keyframes wanautFaqFadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   Blockquote
   ============================================ */
.entry-content blockquote {
    margin: 1.5em 0;
    padding: 1.2em 1.5em 1.2em 1.8em;
    border-left: 4px solid #6366f1;
    background: linear-gradient(135deg, #f8fafc, #eef2ff);
    border-radius: 0 10px 10px 0;
    font-style: italic;
    color: #374151;
    position: relative;
    line-height: 1.7;
}

.entry-content blockquote::before {
    content: "\201C";
    position: absolute;
    top: -0.2em;
    left: 0.3em;
    font-size: 3em;
    color: #6366f1;
    opacity: 0.15;
    font-family: Georgia, serif;
    line-height: 1;
}

.entry-content blockquote p {
    margin: 0.3em 0;
}

.entry-content blockquote cite {
    display: block;
    margin-top: 0.5em;
    font-size: 0.85em;
    color: #6b7280;
    font-style: normal;
}