/**
 * Traffic Writer Client Frontend Block & Disclosure Styles
 * Clean, lightweight, responsive styling for client WordPress websites
 * Version 1.3.0
 */

/* Affiliate / Sponsored Disclosure */
.twc-affiliate-disclosure {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-left: 4px solid #6366f1;
    border-radius: 8px;
    padding: 14px 18px;
    margin: 24px 0;
    font-size: 13px;
    color: #475569;
    line-height: 1.5;
}

.twc-disclosure-icon {
    font-size: 16px;
    color: #6366f1;
    line-height: 1;
    flex-shrink: 0;
    margin-top: 1px;
}

/* Table of Contents */
.twc-table-of-contents {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px 24px;
    margin: 28px 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.twc-toc-header {
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e2e8f0;
}

.twc-toc-title {
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 8px;
}

.twc-toc-list {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.twc-toc-item {
    margin: 6px 0 !important;
    font-size: 14px;
    line-height: 1.4;
}

.twc-toc-level-3 {
    margin-left: 20px !important;
    font-size: 13px;
}

.twc-toc-item a {
    color: #4f46e5;
    text-decoration: none;
    transition: color 0.15s ease;
}

.twc-toc-item a:hover {
    color: #3730a3;
    text-decoration: underline;
}

/* Key Takeaways Card */
.twc-key-takeaways {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 12px;
    padding: 22px 26px;
    margin: 28px 0;
}

.twc-kt-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.twc-kt-icon {
    width: 22px;
    height: 22px;
    color: #16a34a;
}

.twc-kt-header h4 {
    margin: 0 !important;
    font-size: 17px !important;
    font-weight: 700 !important;
    color: #166534 !important;
}

.twc-kt-list {
    margin: 0 !important;
    padding-left: 20px !important;
    color: #1e293b;
    font-size: 15px;
    line-height: 1.6;
}

.twc-kt-list li {
    margin-bottom: 6px;
}

/* FAQ Accordion */
.twc-faq-accordion {
    margin: 32px 0;
}

.twc-faq-item {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    margin-bottom: 12px;
    overflow: hidden;
    transition: all 0.2s ease;
}

.twc-faq-item[open] {
    border-color: #c7d2fe;
    box-shadow: 0 2px 6px rgba(99, 102, 241, 0.08);
}

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

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

.twc-faq-chevron {
    width: 18px;
    height: 18px;
    color: #6366f1;
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.twc-faq-item[open] .twc-faq-chevron {
    transform: rotate(180deg);
}

.twc-faq-answer {
    padding: 0 20px 18px 20px;
    color: #475569;
    font-size: 15px;
    line-height: 1.6;
    border-top: 1px solid #f1f5f9;
    margin-top: 4px;
    padding-top: 14px;
}

/* Pros & Cons Grid */
.twc-pros-cons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
    margin: 28px 0;
}

.twc-pc-col {
    border-radius: 12px;
    padding: 20px;
}

.twc-pros-col {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
}

.twc-cons-col {
    background: #fef2f2;
    border: 1px solid #fecaca;
}

.twc-pc-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.twc-pc-header svg {
    width: 20px;
    height: 20px;
}

.twc-pc-header h4 {
    margin: 0 !important;
    font-size: 16px !important;
    font-weight: 700 !important;
}

.twc-pros-header h4 {
    color: #166534 !important;
}

.twc-cons-header h4 {
    color: #991b1b !important;
}

.twc-pc-list {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
    font-size: 14px;
    color: #334155;
}

.twc-pc-list li {
    margin: 8px 0 !important;
    display: flex;
    align-items: flex-start;
    gap: 6px;
    line-height: 1.4;
}

.twc-check {
    color: #16a34a;
    font-weight: bold;
}

.twc-cross {
    color: #dc2626;
    font-weight: bold;
}

/* Call to Action Box */
.twc-cta-box {
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 100%);
    border-radius: 14px;
    padding: 28px 32px;
    margin: 32px 0;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
    box-shadow: 0 4px 14px rgba(49, 46, 129, 0.25);
}

.twc-cta-content h4 {
    color: #ffffff !important;
    font-size: 20px !important;
    font-weight: 800 !important;
    margin: 0 0 6px 0 !important;
}

.twc-cta-content p {
    color: #c7d2fe !important;
    font-size: 14px !important;
    margin: 0 !important;
}

.twc-cta-btn {
    background: #ffffff;
    color: #3730a3 !important;
    font-weight: 700;
    font-size: 14px;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s ease;
    display: inline-block;
}

.twc-cta-btn:hover {
    background: #e0e7ff;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* 5. Comparison Table Block */
.twc-comparison-table-wrap {
    margin: 32px 0;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #ffffff;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.twc-table-title-wrap {
    padding: 16px 20px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.twc-table-title-wrap h4 {
    margin: 0 !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    color: #0f172a !important;
}

.twc-table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.twc-comparison-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0 !important;
    font-size: 14px;
}

.twc-comparison-table th {
    background: #f1f5f9;
    color: #1e293b;
    font-weight: 700;
    text-align: left;
    padding: 12px 16px;
    border-bottom: 2px solid #e2e8f0;
    white-space: nowrap;
}

.twc-comparison-table td {
    padding: 14px 16px;
    border-bottom: 1px solid #f1f5f9;
    color: #334155;
    vertical-align: middle;
}

.twc-comparison-table tr:last-child td {
    border-bottom: none;
}

.twc-comparison-table tr.twc-highlight-row {
    background: #eef2ff;
    font-weight: 600;
}

.twc-comparison-table tr.twc-highlight-row td {
    color: #1e1b4b;
    border-top: 2px solid #6366f1;
    border-bottom: 2px solid #6366f1;
}

/* 6. Author Review Verdict & Scorecard Block */
.twc-author-verdict-box {
    margin: 36px 0;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 26px 30px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.twc-verdict-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e2e8f0;
    flex-wrap: wrap;
}

.twc-verdict-info {
    flex: 1;
    min-width: 240px;
}

.twc-verdict-badge {
    display: inline-block;
    background: #e0e7ff;
    color: #4338ca;
    font-size: 12px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 9999px;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.twc-verdict-item-name {
    margin: 0 0 8px 0 !important;
    font-size: 20px !important;
    font-weight: 800 !important;
    color: #0f172a !important;
}

.twc-verdict-takeaway {
    margin: 0 !important;
    color: #475569;
    font-size: 14px;
    line-height: 1.5;
}

.twc-verdict-score-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
    color: #ffffff;
    border-radius: 12px;
    padding: 12px 18px;
    min-width: 80px;
    box-shadow: 0 4px 10px rgba(99, 102, 241, 0.3);
}

.twc-verdict-score {
    font-size: 28px;
    font-weight: 900;
    line-height: 1;
}

.twc-verdict-max {
    font-size: 11px;
    opacity: 0.85;
    margin-top: 4px;
    white-space: nowrap;
}

.twc-verdict-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    padding: 20px 0;
    border-bottom: 1px solid #e2e8f0;
}

@media (max-width: 640px) {
    .twc-verdict-columns {
        grid-template-columns: 1fr;
    }
}

.twc-verdict-col strong {
    display: block;
    font-size: 14px;
    margin-bottom: 8px;
    color: #1e293b;
}

.twc-verdict-col ul {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.twc-verdict-col li {
    font-size: 13px;
    color: #475569;
    margin-bottom: 6px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    line-height: 1.4;
}

.twc-verdict-pros .twc-v-icon {
    color: #16a34a;
    font-weight: bold;
}

.twc-verdict-cons .twc-v-icon {
    color: #dc2626;
    font-weight: bold;
}

.twc-verdict-footer {
    padding-top: 18px;
    text-align: right;
}

.twc-verdict-cta {
    display: inline-block;
    background: #10b981;
    color: #ffffff !important;
    font-weight: 700;
    font-size: 14px;
    padding: 10px 22px;
    border-radius: 8px;
    text-decoration: none !important;
    transition: all 0.15s ease;
    box-shadow: 0 2px 6px rgba(16, 185, 129, 0.3);
}

.twc-verdict-cta:hover {
    background: #059669;
    transform: translateY(-1px);
}

/* 7. Affiliate Product Card Showcase Block */
.twc-affiliate-card {
    position: relative;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    overflow: hidden;
    margin: 32px 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease;
}

.twc-affiliate-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

.twc-card-ribbon {
    position: absolute;
    top: 12px;
    right: 12px;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 4px 12px;
    border-radius: 9999px;
    box-shadow: 0 2px 6px rgba(217, 119, 6, 0.3);
}

.twc-card-inner {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 24px;
    flex-wrap: wrap;
}

.twc-card-media {
    flex-shrink: 0;
    width: 140px;
    height: 140px;
    border-radius: 10px;
    overflow: hidden;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.twc-card-media img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.twc-card-details {
    flex: 1;
    min-width: 240px;
}

.twc-card-title {
    margin: 0 0 4px 0 !important;
    font-size: 18px !important;
    font-weight: 800 !important;
    color: #0f172a !important;
}

.twc-card-stars {
    color: #f59e0b;
    font-size: 14px;
    margin-bottom: 10px;
}

.twc-card-stars span {
    color: #64748b;
    font-size: 12px;
    margin-left: 6px;
}

.twc-card-bullets {
    margin: 0 0 16px 0 !important;
    padding-left: 18px !important;
    color: #475569;
    font-size: 13px;
    line-height: 1.5;
}

.twc-card-action-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    padding-top: 12px;
    border-top: 1px solid #f1f5f9;
}

.twc-card-price {
    font-size: 13px;
    color: #64748b;
}

.twc-card-price strong {
    font-size: 16px;
    color: #0f172a;
    margin-left: 4px;
}

.twc-card-btn {
    display: inline-block;
    background: #4f46e5;
    color: #ffffff !important;
    font-weight: 700;
    font-size: 13px;
    padding: 8px 18px;
    border-radius: 6px;
    text-decoration: none !important;
    transition: background 0.15s ease;
}

.twc-card-btn:hover {
    background: #4338ca;
}

/* 8. Notice / Callout Block */
.twc-notice-callout {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 18px 22px;
    border-radius: 10px;
    margin: 28px 0;
    line-height: 1.5;
    border-left: 4px solid #64748b;
}

.twc-notice-icon {
    font-size: 18px;
    line-height: 1;
    flex-shrink: 0;
    margin-top: 2px;
}

.twc-notice-content {
    flex: 1;
}

.twc-notice-title {
    margin: 0 0 4px 0 !important;
    font-size: 15px !important;
    font-weight: 700 !important;
}

.twc-notice-text {
    font-size: 13px;
}

/* Variants */
.twc-notice-info {
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-left: 4px solid #0284c7;
    color: #0369a1;
}
.twc-notice-info .twc-notice-title { color: #075985 !important; }

.twc-notice-tip {
    background: #fdf4ff;
    border: 1px solid #f5d0fe;
    border-left: 4px solid #c026d3;
    color: #86198f;
}
.twc-notice-tip .twc-notice-title { color: #701a75 !important; }

.twc-notice-warning {
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-left: 4px solid #d97706;
    color: #92400e;
}
.twc-notice-warning .twc-notice-title { color: #78350f !important; }

.twc-notice-success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-left: 4px solid #16a34a;
    color: #166534;
}
.twc-notice-success .twc-notice-title { color: #14532d !important; }

