/**
 * Additional Styles
 * 
 * Affiliate features, TOC, Author Box, Related Posts
 */

/*------------------------------------*\
  TABLE OF CONTENTS
\*------------------------------------*/

.toc-container {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin: 2rem 0;
    max-width: 720px;
}

.toc-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.toc-title {
    font-size: 1.25rem;
    margin: 0;
}

.toc-toggle {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    color: #6b7280;
    transition: color 0.2s ease;
}

.toc-toggle:hover {
    color: #2563eb;
}

.toc-list {
    transition: max-height 0.3s ease;
    overflow: hidden;
}

.toc-list.collapsed {
    max-height: 0;
}

.toc-list ol {
    list-style: none;
    counter-reset: toc-counter;
    padding-left: 0;
}

.toc-list li {
    counter-increment: toc-counter;
    margin-bottom: 0.5rem;
}

.toc-list li::before {
    content: counter(toc-counter) ". ";
    font-weight: 600;
    color: #6b7280;
}

.toc-list a {
    color: #4b5563;
    transition: color 0.2s ease;
}

.toc-list a:hover,
.toc-list a.active {
    color: #2563eb;
}

.toc-list ol ol {
    margin-left: 1.5rem;
    margin-top: 0.5rem;
}

/*------------------------------------*\
  AFFILIATE FEATURES
\*------------------------------------*/

/* Affiliate Buttons */
.affiliate-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 0.375rem;
    font-weight: 600;
    text-align: center;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
    text-decoration: none;
}

.affiliate-btn-primary {
    background: #2563eb;
    color: #ffffff;
}

.affiliate-btn-primary:hover {
    background: #1d4ed8;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(37, 99, 235, 0.3);
}

.affiliate-btn-secondary {
    background: #10b981;
    color: #ffffff;
}

.affiliate-btn-secondary:hover {
    background: #059669;
    color: #ffffff;
}

.affiliate-btn-accent {
    background: #f59e0b;
    color: #ffffff;
}

.affiliate-btn-accent:hover {
    background: #d97706;
    color: #ffffff;
}

/* Affiliate Disclosure */
.affiliate-disclosure {
    background: #fffbeb;
    border-left: 4px solid #f59e0b;
    padding: 1rem 1.5rem;
    margin: 2rem 0;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    color: #78350f;
}

/* Product Box */
.product-box {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin: 2rem 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .product-box {
        grid-template-columns: 200px 1fr;
    }
}

.product-box-image img {
    border-radius: 0.375rem;
}

.product-box-title {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.product-box-rating {
    color: #f59e0b;
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.product-box-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2563eb;
    margin: 1rem 0;
}

/* Comparison Table */
.comparison-table-wrapper {
    overflow-x: auto;
    margin: 2rem 0;
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
}

.comparison-table thead {
    background: #2563eb;
    color: #ffffff;
}

.comparison-table th,
.comparison-table td {
    padding: 1rem;
    border: 1px solid #e5e7eb;
    text-align: left;
}

.comparison-table tbody tr:nth-child(even) {
    background: #f9fafb;
}

.comparison-table tbody tr:hover {
    background: #f3f4f6;
}

/* Pros and Cons */
.pros-cons-box {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin: 2rem 0;
}

@media (min-width: 768px) {
    .pros-cons-box {
        grid-template-columns: 1fr 1fr;
    }
}

.pros,
.cons {
    padding: 1.5rem;
    border-radius: 0.5rem;
}

.pros {
    background: #ecfdf5;
    border: 1px solid #10b981;
}

.cons {
    background: #fef2f2;
    border: 1px solid #ef4444;
}

.pros h4 {
    color: #059669;
    margin-bottom: 1rem;
}

.cons h4 {
    color: #dc2626;
    margin-bottom: 1rem;
}

/*------------------------------------*\
  AUTHOR BOX
\*------------------------------------*/

.author-box {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin: 2rem 0;
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 1.5rem;
}

.author-avatar img {
    border-radius: 50%;
    width: 80px;
    height: 80px;
}

.author-name {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.author-name a {
    color: #1f2937;
}

.author-bio {
    color: #4b5563;
    margin-bottom: 0.75rem;
    line-height: 1.6;
}

.author-posts-link {
    font-size: 0.875rem;
    color: #2563eb;
    font-weight: 600;
}

/*------------------------------------*\
  RELATED POSTS
\*------------------------------------*/

.related-posts {
    margin: 3rem 0;
}

.related-posts-title {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #2563eb;
}

.related-posts-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .related-posts-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.related-post-item {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    overflow: hidden;
    transition: box-shadow 0.2s ease;
}

.related-post-item:hover {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.related-post-thumbnail img {
    width: 100%;
    height: auto;
    aspect-ratio: 3/2;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.related-post-item:hover .related-post-thumbnail img {
    transform: scale(1.05);
}

.related-post-title {
    font-size: 1rem;
    padding: 1rem 1rem 0.5rem;
    margin: 0;
}

.related-post-title a {
    color: #1f2937;
}

.related-post-date {
    display: block;
    padding: 0 1rem 1rem;
    font-size: 0.875rem;
    color: #6b7280;
}

/*------------------------------------*\
  PAGINATION
\*------------------------------------*/

.pagination {
    margin: 3rem 0;
    display: flex;
    justify-content: center;
    gap: 0.5rem;
}

.page-numbers {
    padding: 0.5rem 1rem;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 0.375rem;
    color: #4b5563;
    transition: all 0.2s ease;
}

.page-numbers:hover,
.page-numbers.current {
    background: #2563eb;
    color: #ffffff;
    border-color: #2563eb;
}

/*------------------------------------*\
  COMMENTS
\*------------------------------------*/

.comments-area {
    margin: 3rem 0;
    padding-top: 2rem;
    border-top: 2px solid #e5e7eb;
}

.comments-title {
    font-size: 1.5rem;
    margin-bottom: 2rem;
}

.comment-list {
    list-style: none;
    padding: 0;
}

.comment {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #f9fafb;
    border-radius: 0.5rem;
}

.comment-author {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.comment-meta {
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 1rem;
}

.comment-content p {
    margin-bottom: 0.5rem;
}

.comment-form {
    margin-top: 2rem;
}

.comment-form-comment,
.comment-form-author,
.comment-form-email {
    margin-bottom: 1rem;
}

.comment-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.375rem;
    font-family: inherit;
}

.comment-form input[type="submit"] {
    padding: 0.75rem 1.5rem;
    background: #2563eb;
    color: #ffffff;
    border: none;
    border-radius: 0.375rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

.comment-form input[type="submit"]:hover {
    background: #1d4ed8;
}