/* ==========================================================================
   Block Editor Styles

   These render inside wp-admin, which is light. Leave them hardcoded - the
   site's dark design tokens are not loaded in the editor chrome.
   ========================================================================== */
.ssp-comparison-block {
    flex: 1;
    min-width: 0;
    margin: 10px;
}

.ssp-block-preview {
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 15px;
    background: #f9f9f9;
    margin-top: 10px;
}

.ssp-block-preview h3 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 16px;
    font-weight: 600;
}

.ssp-block-preview .preview-info {
    font-size: 13px;
    color: #666;
}

.ssp-block-preview .preview-info p {
    margin: 5px 0;
}

.ssp-block-preview ul {
    margin: 10px 0 0 0;
    padding-left: 0;
    list-style: none;
}

.ssp-block-preview li {
    margin: 3px 0;
    color: #888;
    font-style: italic;
}

/* ==========================================================================
   Frontend Styles

   Everything below uses the site's shared design tokens so these blocks
   follow the theme instead of fighting it. The tokens are defined globally
   by the theme; the fallbacks match the current live values so a missing
   token degrades to the right colour rather than to browser defaults.

   --ink   body/heading text      --card   raised surface
   --muted secondary text         --panel  recessed surface
   --line  borders and rules      --brand / --brand-strong  accents
   ========================================================================== */

.ssp-comparison-container {
    width: 50%;
    float: left;
    padding: 0 10px;
    box-sizing: border-box;
}

.comparison-kb,
.comparison-other {
    width: 100%;
    padding: 20px;
    border: 1px solid var(--line, #344054);
    border-radius: 6px;
    background: var(--panel, #182030);
    box-sizing: border-box;
    margin-bottom: 20px;
}

/* Clear floats after comparison blocks */
.ssp-comparison-container:nth-child(2n)::after {
    content: "";
    display: table;
    clear: both;
}

.comparison-kb h2,
.comparison-other h2 {
    margin: 0 0 15px 0;
    color: var(--ink, #dbe2f9);
    font-size: 18px;
    border-bottom: 2px solid var(--brand-strong, #7f56d9);
    padding-bottom: 8px;
}

.comparison-kb ul,
.comparison-other ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.comparison-kb li,
.comparison-other li {
    margin: 8px 0;
    padding: 5px 0;
    border-bottom: 1px solid var(--line, #344054);
}

.comparison-kb li:last-child,
.comparison-other li:last-child {
    border-bottom: none;
}

.comparison-kb a,
.comparison-other a {
    color: var(--brand, #d1bcff);
    text-decoration: none;
    font-weight: 500;
}

.comparison-kb a:hover,
.comparison-other a:hover {
    color: var(--ink, #dbe2f9);
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
    .ssp-comparison-block {
        margin: 10px 0;
    }

    .ssp-comparison-container {
        width: 100%;
        float: none;
        padding: 0;
    }
}

/* ==========================================================================
   Product CTA Block

   Matches the house button style used by the pricing block: a recessed
   panel with a solid brand pill, rather than the old admin-blue gradient.
   ========================================================================== */

.ssp-product-cta {
    clear: both;
    background: var(--panel, #182030);
    border: 1px solid var(--line, #344054);
    border-radius: 16px;
    padding: 22px 28px;
    margin: 0 0 28px;
}

.ssp-product-cta-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.ssp-product-cta-tagline {
    color: var(--ink, #dbe2f9);
    font-size: 16px;
    font-weight: 500;
    margin: 0;
    line-height: 1.4;
}

.ssp-product-cta-btn {
    display: inline-block;
    background: var(--brand-strong, #7f56d9);
    color: #fff;
    padding: 10px 24px;
    border-radius: 9999px;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    white-space: nowrap;
    transition: box-shadow 0.2s ease, transform 0.15s ease;
    flex-shrink: 0;
}

.ssp-product-cta-btn:hover {
    background: var(--brand-strong, #7f56d9);
    color: #fff;
    box-shadow: 0 0 20px rgba(127, 86, 217, 0.4);
    text-decoration: none;
}

/* ==========================================================================
   Tabbed Blocks (KB + Articles)
   ========================================================================== */

.ssp-tabbed-block {
    border: 1px solid var(--line, #344054);
    border-radius: 16px;
    background: var(--panel, #182030);
    margin: 0 0 28px;
    overflow: hidden;
}

/* Header: heading + "view all" link */
.ssp-tabbed-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    padding: 22px 24px 0;
    gap: 12px;
    flex-wrap: wrap;
}

.ssp-tabbed-header h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: var(--ink, #dbe2f9);
    border: none;
    padding: 0;
}

.ssp-view-all-link {
    font-size: 13px;
    color: var(--brand, #d1bcff);
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
}

.ssp-view-all-link:hover {
    text-decoration: underline;
    color: var(--ink, #dbe2f9);
}

/* Tab navigation bar */
.ssp-tab-nav {
    display: flex;
    padding: 14px 24px 0;
    border-bottom: 2px solid var(--line, #344054);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 4px;
}

.ssp-tab-nav::-webkit-scrollbar {
    display: none;
}

/* Individual tab buttons.
   The !important flags are inherited from the original file: they exist to
   beat the theme's own button styling. Colours updated, flags left alone. */
.ssp-tab-btn {
    background: none !important;
    background-color: transparent !important;
    border: none;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    padding: 7px 14px 10px;
    font-size: 13px;
    font-weight: 500;
    color: var(--muted, #cbc3d5) !important;
    cursor: pointer;
    white-space: nowrap;
    border-radius: 4px 4px 0 0 !important;
    transition: color 0.12s ease, border-color 0.12s ease, background 0.12s ease;
    line-height: 1.3;
}

.ssp-tab-btn:hover {
    color: var(--brand, #d1bcff) !important;
    background: var(--card, #1d2939) !important;
    background-color: var(--card, #1d2939) !important;
    border-radius: 4px 4px 0 0 !important;
}

.ssp-tab-btn.ssp-tab-active,
.ssp-tab-btn[aria-selected="true"] {
    color: var(--brand, #d1bcff) !important;
    border-bottom-color: var(--brand-strong, #7f56d9);
    font-weight: 600;
    background: none !important;
    background-color: transparent !important;
    border-radius: 4px 4px 0 0 !important;
}

/* Tab panel wrapper */
.ssp-tab-panels {
    padding: 20px 24px 16px;
}

.ssp-tab-panel[hidden] {
    display: none;
}

/* Article list inside each panel */
.ssp-article-list {
    list-style: none;
    margin: 0 0 14px;
    padding: 0;
    columns: 2;
    column-gap: 32px;
}

.ssp-article-list li {
    margin: 0 0 9px;
    padding: 0;
    break-inside: avoid;
    border-bottom: none;
}

.ssp-article-list a {
    color: var(--ink, #dbe2f9);
    text-decoration: none;
    font-size: 14px;
    display: flex;
    align-items: flex-start;
    gap: 5px;
    line-height: 1.45;
}

.ssp-article-list a::before {
    content: "\2192";
    color: var(--brand, #d1bcff);
    flex-shrink: 0;
    font-size: 12px;
    margin-top: 2px;
}

.ssp-article-list a:hover {
    color: var(--brand, #d1bcff);
    text-decoration: underline;
}

/* Per-tab "view all" footer link */
.ssp-tab-view-all {
    display: inline-block;
    font-size: 13px;
    color: var(--brand, #d1bcff);
    text-decoration: none;
    border-top: 1px solid var(--line, #344054);
    padding-top: 12px;
    margin-top: 4px;
    width: 100%;
}

.ssp-tab-view-all:hover {
    text-decoration: underline;
    color: var(--ink, #dbe2f9);
}

/* ==========================================================================
   Product Description Block
   ========================================================================== */

.ssp-product-description {
    background: var(--panel, #182030);
    border-left: 4px solid var(--brand-strong, #7f56d9);
    border-radius: 0 6px 6px 0;
    padding: 16px 20px;
    margin: 0 0 24px;
}

.ssp-product-description p {
    margin: 0 0 8px;
    line-height: 1.6;
    font-size: 15px;
    color: var(--ink, #dbe2f9);
}

.ssp-product-description p:last-child {
    margin-bottom: 0;
}

.ssp-product-description ul,
.ssp-product-description ol {
    margin: 6px 0 0 0;
    padding-left: 22px;
}

.ssp-product-description li {
    margin: 5px 0;
    line-height: 1.5;
    font-size: 14px;
    color: var(--ink, #dbe2f9);
}

/* ==========================================================================
   Product Reviews Block
   ========================================================================== */

.ssp-product-reviews {
    margin: 0 0 28px;
}

.ssp-product-reviews > h2 {
    font-size: 20px;
    font-weight: 700;
    color: var(--ink, #dbe2f9);
    margin: 0 0 20px;
    padding: 0;
    border: none;
}

/* Full width, one review per row.
   Three columns forced every card to the height of the longest review, so a
   single long quote left two cards mostly empty. Stacking removes that
   entirely and gives the quotes room to read. */
.ssp-reviews-grid {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.ssp-review-card {
    background: var(--card, #1d2939);
    border: 1px solid var(--line, #344054);
    border-radius: 16px;
    padding: 18px 22px;
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: baseline;
    column-gap: 14px;
    row-gap: 6px;
}

/* Stars and attribution share the top line, quote runs full width beneath. */
.ssp-review-card .ssp-review-stars {
    grid-column: 1;
    grid-row: 1;
}

.ssp-review-card .ssp-review-author {
    grid-column: 2;
    grid-row: 1;
}

.ssp-review-card .ssp-review-text {
    grid-column: 1 / -1;
    grid-row: 2;
}

/* Star gold stays a literal - it is a rating colour, not a theme colour. */
.ssp-review-stars {
    color: #f5a300;
    font-size: 20px;
    letter-spacing: 1px;
    line-height: 1;
}

.ssp-review-text {
    color: var(--ink, #dbe2f9);
    font-size: 14px;
    line-height: 1.65;
    margin: 0;
    font-style: italic;
    flex: 1;
}

.ssp-review-author {
    font-size: 12px;
    color: var(--muted, #cbc3d5);
    font-style: normal;
    font-weight: 400;
}

/* ==========================================================================
   Product Changelog Block
   ========================================================================== */

.comparison-changelog {
    width: 100%;
    padding: 20px;
    border: 1px solid var(--line, #344054);
    border-radius: 16px;
    background: var(--panel, #182030);
    box-sizing: border-box;
    margin-bottom: 20px;
}

.comparison-changelog h2 {
    margin: 0 0 15px 0;
    color: var(--ink, #dbe2f9);
    font-size: 18px;
    border-bottom: 2px solid var(--brand-strong, #7f56d9);
    padding-bottom: 8px;
}

.ssp-changelog-entry {
    margin-bottom: 16px;
}

.ssp-changelog-version {
    font-size: 14px;
    font-weight: 600;
    color: var(--ink, #dbe2f9);
    margin: 0 0 6px;
}

.comparison-changelog ul {
    margin: 0;
    padding-left: 18px;
    list-style: disc;
}

.comparison-changelog li {
    margin: 4px 0 !important;
    padding: 0;
    font-size: 13px;
    color: var(--muted, #cbc3d5);
    border-bottom: none;
    line-height: 16px;
}

.single-comparison .rh_post_layout_inner_image #rh_post_layout_inimage {
    min-height: 115px;
}

.single-comparison .title_single_area .post-meta-big {
    display: none;
}

.ssp-changelog-view-all {
    display: inline-block;
    font-size: 13px;
    color: var(--brand, #d1bcff);
    text-decoration: none;
    margin-top: 12px;
}

.ssp-changelog-view-all:hover {
    text-decoration: underline;
    color: var(--ink, #dbe2f9);
}

/* ==========================================================================
   Useful Links Block
   ========================================================================== */

.ssp-useful-links {
    border: 1px solid var(--line, #344054);
    border-radius: 16px;
    background: var(--panel, #182030);
    padding: 22px 24px;
    margin: 0 0 28px;
}

.ssp-useful-links h2 {
    margin: 0 0 16px;
    font-size: 20px;
    font-weight: 700;
    color: var(--ink, #dbe2f9);
    border: none;
    padding: 0;
}

.ssp-useful-links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
    gap: 10px 24px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.ssp-useful-links-grid li {
    margin: 0;
    padding: 0;
    border-bottom: none;
}

.ssp-useful-links-grid a {
    display: flex;
    align-items: baseline;
    gap: 8px;
    color: var(--ink, #dbe2f9);
    text-decoration: none;
    font-size: 14px;
    line-height: 1.45;
    padding: 6px 0;
}

.ssp-useful-links-grid a::before {
    content: "\2192";
    color: var(--brand, #d1bcff);
    flex-shrink: 0;
    font-size: 12px;
}

.ssp-useful-links-grid a:hover {
    color: var(--brand, #d1bcff);
    text-decoration: underline;
}

.ssp-useful-links-grid .ul-desc {
    display: block;
    color: var(--muted, #cbc3d5);
    font-size: 12.5px;
    line-height: 1.4;
    margin-top: 2px;
}

/* ==========================================================================
   Responsive overrides
   ========================================================================== */

@media (max-width: 768px) {
    .ssp-product-cta-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
    }

    .ssp-tabbed-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .ssp-tabbed-header h2 {
        font-size: 18px;
    }

    .ssp-tab-nav {
        padding-left: 16px;
        padding-right: 16px;
    }

    .ssp-tab-panels {
        padding: 16px;
    }

    .ssp-article-list {
        columns: 1;
    }

    /* Stars above the attribution rather than beside it, so a long name
       does not squeeze against them on a narrow screen. */
    .ssp-review-card {
        grid-template-columns: 1fr;
        padding: 16px 18px;
    }

    .ssp-review-card .ssp-review-author {
        grid-column: 1;
        grid-row: 2;
    }

    .ssp-review-card .ssp-review-text {
        grid-row: 3;
    }
}
