/**
 * AcademyFlow SEO - Frontend Styles
 *
 * @package AcademyFlow_SEO
 * @version 1.0.0
 */

/* ==========================================================================
   Breadcrumbs
   ========================================================================== */
.eh-seo-breadcrumbs {
    font-size: 14px;
    line-height: 1.5;
    padding: 12px 0;
    color: #6b7280;
}

.eh-seo-breadcrumbs a {
    color: #4f46e5;
    text-decoration: none;
    transition: color 0.2s ease;
}

.eh-seo-breadcrumbs a:hover {
    color: #4338ca;
    text-decoration: underline;
}

.eh-seo-breadcrumbs .separator {
    display: inline-block;
    margin: 0 8px;
    color: #9ca3af;
}

.eh-seo-breadcrumbs .current {
    color: #374151;
    font-weight: 500;
}

/* RTL Support */
[dir="rtl"] .eh-seo-breadcrumbs .separator {
    transform: scaleX(-1);
}

/* Breadcrumb Styles */

/* Style: Default */
.eh-seo-breadcrumbs.style-default {
    /* Uses base styles */
}

/* Style: Arrow */
.eh-seo-breadcrumbs.style-arrow .separator {
    margin: 0 6px;
}

.eh-seo-breadcrumbs.style-arrow .separator::before {
    content: "›";
    font-size: 16px;
}

[dir="rtl"] .eh-seo-breadcrumbs.style-arrow .separator::before {
    content: "‹";
}

/* Style: Slash */
.eh-seo-breadcrumbs.style-slash .separator::before {
    content: "/";
}

/* Style: Chevron */
.eh-seo-breadcrumbs.style-chevron .separator::before {
    content: "";
    display: inline-block;
    width: 6px;
    height: 6px;
    border-right: 2px solid currentColor;
    border-top: 2px solid currentColor;
    transform: rotate(45deg);
    vertical-align: middle;
}

[dir="rtl"] .eh-seo-breadcrumbs.style-chevron .separator::before {
    transform: rotate(-135deg);
}

/* Style: Bullet */
.eh-seo-breadcrumbs.style-bullet .separator::before {
    content: "•";
}

/* Style: Double Arrow */
.eh-seo-breadcrumbs.style-double-arrow .separator::before {
    content: "»";
    font-size: 16px;
}

[dir="rtl"] .eh-seo-breadcrumbs.style-double-arrow .separator::before {
    content: "«";
}

/* Background Variations */
.eh-seo-breadcrumbs.with-background {
    background: #f3f4f6;
    padding: 12px 16px;
    border-radius: 6px;
}

.eh-seo-breadcrumbs.with-border {
    border: 1px solid #e5e7eb;
    padding: 12px 16px;
    border-radius: 6px;
}

/* Size Variations */
.eh-seo-breadcrumbs.size-small {
    font-size: 12px;
    padding: 8px 0;
}

.eh-seo-breadcrumbs.size-large {
    font-size: 16px;
    padding: 16px 0;
}

/* Color Schemes */
.eh-seo-breadcrumbs.scheme-dark {
    color: #e5e7eb;
}

.eh-seo-breadcrumbs.scheme-dark a {
    color: #818cf8;
}

.eh-seo-breadcrumbs.scheme-dark a:hover {
    color: #a5b4fc;
}

.eh-seo-breadcrumbs.scheme-dark .current {
    color: #f9fafb;
}

.eh-seo-breadcrumbs.scheme-dark .separator {
    color: #6b7280;
}

/* Breadcrumb Container */
.eh-seo-breadcrumbs-wrap {
    margin-bottom: 20px;
}

/* Microdata wrapper */
.eh-seo-breadcrumbs [itemprop="itemListElement"] {
    display: inline;
}

/* Home icon option */
.eh-seo-breadcrumbs .home-icon {
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
}

.eh-seo-breadcrumbs .home-icon svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

/* ==========================================================================
   Table of Contents (Optional Frontend Feature)
   ========================================================================== */
.eh-seo-toc {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

.eh-seo-toc-title {
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 15px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
}

.eh-seo-toc-title .toggle-icon {
    font-size: 12px;
    color: #6b7280;
    transition: transform 0.3s ease;
}

.eh-seo-toc.collapsed .toggle-icon {
    transform: rotate(-90deg);
}

[dir="rtl"] .eh-seo-toc.collapsed .toggle-icon {
    transform: rotate(90deg);
}

.eh-seo-toc-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.eh-seo-toc.collapsed .eh-seo-toc-list {
    display: none;
}

.eh-seo-toc-list li {
    margin: 8px 0;
    line-height: 1.5;
}

.eh-seo-toc-list a {
    color: #4b5563;
    text-decoration: none;
    transition: color 0.2s ease;
}

.eh-seo-toc-list a:hover {
    color: #4f46e5;
}

/* Nested lists */
.eh-seo-toc-list ul {
    margin: 8px 0 0 20px;
    padding: 0;
    list-style: none;
}

[dir="rtl"] .eh-seo-toc-list ul {
    margin-left: 0;
    margin-right: 20px;
}

.eh-seo-toc-list ul li {
    font-size: 14px;
}

/* Numbered style */
.eh-seo-toc.numbered .eh-seo-toc-list {
    counter-reset: toc-counter;
}

.eh-seo-toc.numbered .eh-seo-toc-list li {
    counter-increment: toc-counter;
}

.eh-seo-toc.numbered .eh-seo-toc-list li::before {
    content: counter(toc-counter) ". ";
    color: #9ca3af;
    margin-right: 5px;
}

[dir="rtl"] .eh-seo-toc.numbered .eh-seo-toc-list li::before {
    margin-right: 0;
    margin-left: 5px;
}

/* ==========================================================================
   Reading Progress Bar (Optional)
   ========================================================================== */
.eh-seo-reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    z-index: 99999;
    background: transparent;
}

.eh-seo-reading-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #4f46e5 0%, #818cf8 100%);
    width: 0;
    transition: width 0.1s ease;
}

/* Admin bar offset */
.admin-bar .eh-seo-reading-progress {
    top: 32px;
}

@media screen and (max-width: 782px) {
    .admin-bar .eh-seo-reading-progress {
        top: 46px;
    }
}

/* ==========================================================================
   Schema FAQ Accordion (For FAQ Schema Display)
   ========================================================================== */
.eh-seo-faq {
    margin: 20px 0;
}

.eh-seo-faq-item {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin-bottom: 10px;
    overflow: hidden;
}

.eh-seo-faq-question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: #f9fafb;
    cursor: pointer;
    user-select: none;
    transition: background 0.2s ease;
}

.eh-seo-faq-question:hover {
    background: #f3f4f6;
}

.eh-seo-faq-question h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 500;
    color: #1f2937;
}

.eh-seo-faq-question .icon {
    width: 20px;
    height: 20px;
    color: #6b7280;
    transition: transform 0.3s ease;
}

.eh-seo-faq-item.active .eh-seo-faq-question .icon {
    transform: rotate(180deg);
}

.eh-seo-faq-answer {
    padding: 0 20px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.eh-seo-faq-item.active .eh-seo-faq-answer {
    padding: 20px;
    max-height: 1000px;
}

.eh-seo-faq-answer p {
    margin: 0;
    color: #4b5563;
    line-height: 1.6;
}

/* ==========================================================================
   Author Box (For Article Schema)
   ========================================================================== */
.eh-seo-author-box {
    display: flex;
    gap: 20px;
    padding: 24px;
    background: #f9fafb;
    border-radius: 12px;
    margin: 30px 0;
}

.eh-seo-author-avatar {
    flex-shrink: 0;
}

.eh-seo-author-avatar img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
}

.eh-seo-author-info h4 {
    margin: 0 0 8px 0;
    font-size: 18px;
    color: #1f2937;
}

.eh-seo-author-info h4 a {
    color: inherit;
    text-decoration: none;
}

.eh-seo-author-info h4 a:hover {
    color: #4f46e5;
}

.eh-seo-author-bio {
    color: #4b5563;
    font-size: 14px;
    line-height: 1.6;
    margin: 0 0 12px 0;
}

.eh-seo-author-social {
    display: flex;
    gap: 12px;
}

.eh-seo-author-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: #e5e7eb;
    border-radius: 50%;
    color: #4b5563;
    transition: all 0.2s ease;
}

.eh-seo-author-social a:hover {
    background: #4f46e5;
    color: white;
}

.eh-seo-author-social svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

@media (max-width: 600px) {
    .eh-seo-author-box {
        flex-direction: column;
        text-align: center;
    }

    .eh-seo-author-avatar {
        margin: 0 auto;
    }

    .eh-seo-author-social {
        justify-content: center;
    }
}

/* ==========================================================================
   Rating Stars (For Product/Review Schema)
   ========================================================================== */
.eh-seo-rating {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.eh-seo-stars {
    display: inline-flex;
    gap: 2px;
}

.eh-seo-star {
    width: 18px;
    height: 18px;
    color: #fbbf24;
}

.eh-seo-star.empty {
    color: #d1d5db;
}

.eh-seo-star.half {
    position: relative;
}

.eh-seo-star.half::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 50%;
    height: 100%;
    overflow: hidden;
}

.eh-seo-rating-text {
    font-size: 14px;
    color: #6b7280;
}

.eh-seo-rating-text strong {
    color: #1f2937;
}

/* ==========================================================================
   HowTo Steps (For HowTo Schema)
   ========================================================================== */
.eh-seo-howto {
    margin: 20px 0;
}

.eh-seo-howto-title {
    font-size: 24px;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 20px 0;
}

.eh-seo-howto-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 24px;
    font-size: 14px;
    color: #6b7280;
}

.eh-seo-howto-meta span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.eh-seo-howto-steps {
    counter-reset: step-counter;
}

.eh-seo-howto-step {
    display: flex;
    gap: 20px;
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid #e5e7eb;
}

.eh-seo-howto-step:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.eh-seo-howto-step-number {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    background: #4f46e5;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 16px;
    counter-increment: step-counter;
}

.eh-seo-howto-step-number::before {
    content: counter(step-counter);
}

.eh-seo-howto-step-content {
    flex: 1;
}

.eh-seo-howto-step-title {
    font-size: 18px;
    font-weight: 500;
    color: #1f2937;
    margin: 0 0 8px 0;
}

.eh-seo-howto-step-text {
    color: #4b5563;
    line-height: 1.6;
    margin: 0;
}

.eh-seo-howto-step-image {
    margin-top: 12px;
}

.eh-seo-howto-step-image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

/* ==========================================================================
   Print Styles
   ========================================================================== */
@media print {
    .eh-seo-breadcrumbs {
        display: none;
    }

    .eh-seo-reading-progress {
        display: none;
    }

    .eh-seo-toc {
        border: 1px solid #000;
        page-break-inside: avoid;
    }

    .eh-seo-faq-item {
        page-break-inside: avoid;
    }

    .eh-seo-faq-answer {
        max-height: none !important;
        padding: 20px !important;
    }
}
