/* ============================================================
   AI Readmore - Front-End Styles
   ============================================================ */

/* --- FAQ Accordion List (in-post) --- */
.ai-readmore-faq-list {
    margin: 32px 0;
    border: 2px solid #2563eb;
    border-radius: 12px;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.ai-readmore-faq-header {
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    color: #fff;
    padding: 16px 20px;
    font-size: 15px;
    font-weight: 600;
}

.ai-readmore-faq-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 20px;
    border-bottom: 1px solid #e5e7eb;
    text-decoration: none;
    color: #1e293b;
    font-weight: 500;
    font-size: 15px;
    transition: background-color 0.15s;
}

.ai-readmore-faq-item:last-child {
    border-bottom: none;
}

.ai-readmore-faq-item:hover {
    background-color: #f8fafc;
    color: #1e293b;
    text-decoration: none;
}

.ai-readmore-faq-item .arrow {
    color: #2563eb;
    font-size: 18px;
    flex-shrink: 0;
    margin-left: 12px;
}

.ai-readmore-faq-footer {
    text-align: center;
    color: #94a3b8;
    font-size: 12px;
    padding: 10px 20px;
    border-top: 1px solid #e5e7eb;
    background: #f8fafc;
}

/* --- Standalone Page Reset --- */
body.ai-readmore-standalone {
    margin: 0;
    padding: 0;
    background: #f8fafc;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #1e293b;
    -webkit-font-smoothing: antialiased;
}

/* Site Header */
.ai-readmore-site-header {
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
    padding: 12px 24px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.ai-readmore-site-logo {
    display: inline-block;
    text-decoration: none;
    color: #1e293b;
    font-size: 20px;
    font-weight: 700;
}

.ai-readmore-site-logo img {
    max-height: 40px;
    width: auto;
    display: block;
}

/* --- Answer Page --- */
.ai-readmore-answer-page {
    max-width: 720px;
    margin: 32px auto;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

/* Featured Image */
.ai-readmore-featured-image {
    position: relative;
    height: 260px;
    overflow: hidden;
}

.ai-readmore-featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ai-readmore-featured-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.1), rgba(0,0,0,0.5));
}

/* Breadcrumb */
.ai-readmore-breadcrumb {
    background: #f1f5f9;
    padding: 12px 24px;
    font-size: 13px;
    color: #64748b;
    border-bottom: 1px solid #e2e8f0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ai-readmore-breadcrumb a {
    color: #2563eb;
    text-decoration: none;
}

.ai-readmore-breadcrumb a:hover {
    text-decoration: underline;
}

.ai-readmore-breadcrumb .separator {
    margin: 0 6px;
}

.ai-readmore-breadcrumb .current {
    color: #475569;
}

/* Question Header */
.ai-readmore-question-header {
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    color: #fff;
    padding: 32px 24px;
}

.ai-readmore-question-number {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.8;
    margin-bottom: 8px;
}

.ai-readmore-question-title {
    font-size: 22px;
    font-weight: 700;
    margin: 0;
    line-height: 1.4;
    color: #fff;
}

/* Answer Body */
.ai-readmore-answer-body {
    padding: 28px 24px;
}

.ai-readmore-answer-indicator {
    font-size: 13px;
    color: #64748b;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.ai-readmore-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: #22c55e;
    border-radius: 50%;
}

.ai-readmore-answer-content {
    font-size: 15px;
    line-height: 1.8;
    color: #1e293b;
}

.ai-readmore-answer-content p {
    margin-bottom: 1em;
}

.ai-readmore-answer-content ol,
.ai-readmore-answer-content ul {
    padding-left: 20px;
    margin-bottom: 1em;
}

.ai-readmore-answer-content li {
    margin-bottom: 0.4em;
}

/* Source Notice */
.ai-readmore-source-notice {
    margin-top: 24px;
    padding: 12px 16px;
    background: #fef3c7;
    border-radius: 8px;
    border-left: 3px solid #f59e0b;
    font-size: 13px;
    color: #92400e;
}

/* Navigation */
.ai-readmore-answer-nav {
    padding: 16px 24px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ai-readmore-answer-nav a {
    color: #2563eb;
    text-decoration: none;
    font-size: 13px;
}

.ai-readmore-answer-nav a:hover {
    text-decoration: underline;
}

.ai-readmore-answer-nav a.back {
    font-size: 14px;
    font-weight: 500;
}

.ai-readmore-answer-nav .disabled {
    color: #94a3b8;
    font-size: 13px;
}

/* Other Questions */
.ai-readmore-other-questions {
    padding: 16px 24px;
    background: #f8fafc;
    border-top: 1px solid #e5e7eb;
}

.ai-readmore-other-questions h3 {
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    margin: 0 0 10px;
}

.ai-readmore-other-item {
    display: flex;
    gap: 8px;
    padding: 8px 0;
    border-bottom: 1px solid #e5e7eb;
    font-size: 13px;
    color: #64748b;
    text-decoration: none;
}

.ai-readmore-other-item:last-child {
    border-bottom: none;
}

.ai-readmore-other-item:hover {
    color: #2563eb;
}

.ai-readmore-other-item .q-number {
    color: #2563eb;
    font-weight: 600;
    flex-shrink: 0;
}

/* --- Responsive --- */
@media (max-width: 640px) {
    .ai-readmore-question-header {
        padding: 24px 16px;
    }

    .ai-readmore-question-title {
        font-size: 18px;
    }

    .ai-readmore-answer-body {
        padding: 20px 16px;
    }

    .ai-readmore-featured-image {
        height: 180px;
    }
}
