/* ==========================================================================
   SEO Autopilot – Frontend Widgets Styling
   ========================================================================== */

/* 1. Breadcrumbs */
.seo-autopilot-breadcrumbs {
    font-size: 13px;
    margin: 12px 0;
    line-height: 1.5;
}

.seo-autopilot-breadcrumbs ol {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

.seo-autopilot-breadcrumbs li {
    display: inline-block;
}

.seo-autopilot-breadcrumbs a {
    text-decoration: none;
    color: #4B5563;
    transition: color 0.2s;
}

.seo-autopilot-breadcrumbs a:hover {
    color: #5B5FEF;
}

.seo-autopilot-breadcrumbs .sap-sep {
    margin: 0 6px;
    color: #9CA3AF;
}

/* 2. Table of Contents */
.seo-autopilot-toc-box {
    background: #F8F9FA;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    padding: 20px;
    margin: 24px 0;
    max-width: 600px;
}

.sap-toc-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 16px;
    color: #111827;
    margin-bottom: 12px;
}

.sap-toc-toggle-btn {
    background: none;
    border: none;
    cursor: pointer;
    margin-left: auto;
    font-size: 14px;
    color: #6B7280;
}

.sap-toc-list {
    margin: 0;
    padding-left: 20px;
}

.sap-toc-item {
    margin: 6px 0;
    font-size: 14px;
}

.sap-toc-item.sap-toc-h3 {
    margin-left: 16px;
    list-style-type: circle;
}

.sap-toc-link {
    color: #374151;
    text-decoration: none;
}

.sap-toc-link:hover {
    color: #5B5FEF;
    text-decoration: underline;
}

/* 3. FAQ Accordion */
.seo-autopilot-faq-accordion {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 24px 0;
}

.sap-faq-card {
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 10px;
    overflow: hidden;
    transition: border-color 0.2s;
}

.sap-faq-card[open] {
    border-color: #C7D2FE;
}

.sap-faq-question {
    padding: 16px 20px;
    font-weight: 600;
    font-size: 16px;
    color: #111827;
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sap-faq-question::-webkit-details-marker {
    display: none;
}

.sap-faq-icon {
    font-size: 20px;
    color: #5B5FEF;
    transition: transform 0.2s;
}

.sap-faq-card[open] .sap-faq-icon {
    transform: rotate(45deg);
}

.sap-faq-answer {
    padding: 0 20px 18px 20px;
    font-size: 14px;
    line-height: 1.6;
    color: #4B5563;
}

/* 4. Author Box */
.seo-autopilot-author-card {
    display: flex;
    gap: 20px;
    background: #F9FAFB;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    padding: 24px;
    margin: 32px 0;
    align-items: center;
}

.sap-author-avatar img {
    border-radius: 50%;
    display: block;
}

.sap-author-name {
    margin: 0 0 4px 0;
    font-size: 18px;
}

.sap-author-name a {
    color: #111827;
    text-decoration: none;
}

.sap-author-tagline {
    font-size: 12px;
    font-weight: 600;
    color: #5B5FEF;
    margin: 0 0 8px 0;
}

.sap-author-bio p {
    margin: 0;
    font-size: 14px;
    color: #4B5563;
    line-height: 1.5;
}

/* 5. Related Posts Grid */
.seo-autopilot-related-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin: 24px 0;
}

.sap-related-card {
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.sap-related-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
}

.sap-related-thumb img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    display: block;
}

.sap-related-title {
    margin: 12px 16px;
    font-size: 15px;
    line-height: 1.4;
}

.sap-related-title a {
    color: #111827;
    text-decoration: none;
}

.sap-related-title a:hover {
    color: #5B5FEF;
}

/* 6. Score Badge */
.seo-autopilot-score-badge-card {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    padding: 12px 18px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.04);
}

.sap-badge-circle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 800;
}

.score-good .sap-badge-circle { background: #16A34A; }
.score-warning .sap-badge-circle { background: #F59E0B; }
.score-critical .sap-badge-circle { background: #DC2626; }

.sap-badge-num { font-size: 14px; line-height: 1; }
.sap-badge-total { font-size: 8px; opacity: 0.8; }
.sap-badge-label { font-size: 13px; font-weight: 700; color: #111827; display: block; }
.sap-badge-status { font-size: 11px; color: #6B7280; font-weight: 600; }
