/*
 * Single integration page — single-integrations.php.
 * Figma: SimplyDepo-Website › Integrations › "Detail page"
 * (Desktop 22508:87250, Mobile 22587:755).
 *
 * Everything here is scoped to body.integration-article. The article body
 * and FAQ are styled entirely by the Blog (css/post-new.css,
 * css/blog-shortcodes.css, faq.css); this file holds only the page grid, the
 * summary column and the related section. Typography comes from sd-type-*
 * classes in the markup.
 */

body.integration-article {
    --integration-ink: #262626;
    --integration-secondary: rgba(0, 0, 0, .75);
    --integration-tertiary: rgba(0, 0, 0, .55);
    --integration-divider: #e5e5e5;
}

/* ---- Page grid: summary (328) + 80 gap + content (792) inside 1200 ---- */

.integration-article .integration-single__grid {
    display: grid;
    grid-template-columns: minmax(0, 328px) minmax(0, 792px);
    justify-content: space-between;
    align-items: start;
    column-gap: 80px;
}

.integration-article [style*="--integration-max-width"] {
    max-width: var(--integration-max-width);
}

/* ---- Summary column ---- */

.integration-article .integration-single__summary {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
    min-width: 0;
    padding: 64px 0;
}

/* Sticky like the Blog sidebar. --integration-summary-top is the fixed
   header height, or negative when the column is taller than the viewport
   (js/integration-single.js) so its bottom stays reachable. */
@media (min-width: 992px) {
    .integration-article .integration-single__summary {
        position: sticky;
        top: var(--integration-summary-top, 80px);
    }
}

.integration-article .integration-single__logo {
    display: flex;
    width: 80px;
    height: 80px;
    flex: 0 0 80px;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 5px 18px rgba(0, 0, 0, .07);
}

.integration-article .integration-single__logo img {
    display: block;
    width: 48px;
    height: 48px;
    object-fit: contain;
}

.integration-article .integration-single__intro {
    display: flex;
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
}

.integration-article .integration-single__title {
    margin: 0;
    color: var(--integration-ink);
}

.integration-article .integration-single__description {
    margin: 0;
    color: var(--integration-secondary);
}

.integration-article .integration-single__details {
    width: 100%;
    margin: 0;
    border-top: 1px solid var(--integration-divider);
}

.integration-article .integration-single__detail {
    display: flex;
    gap: 16px;
    padding: 12px 0;
    border-bottom: 1px solid var(--integration-divider);
}

.integration-article .integration-single__detail dt {
    flex: 0 0 80px;
    margin: 0;
    color: var(--integration-tertiary);
}

.integration-article .integration-single__detail dd {
    min-width: 0;
    margin: 0;
    color: var(--integration-ink);
}

/* ---- Article column ----
   The body is written in the regular editor and rendered with the Blog's
   article markup; the template adds sd-type-heading-md / sd-type-body-md to
   bare <h2>/<p>. Below only the Figma block rhythm (56px between sections,
   32px on mobile) replaces the Blog's article spacing. */

.integration-article .integration-single__content {
    min-width: 0;
    padding: 64px 0;
}

.post-new .integration-single__content .post-main-content__text > * {
    margin-top: 0;
    margin-bottom: 0;
}

.post-new .integration-single__content .post-main-content__text h2 {
    padding: 56px 0 24px;
}

.post-new .integration-single__content .post-main-content__text > :first-child {
    padding-top: 0;
}

/* Figma: 18px between a section title and its first paragraph. */
.post-new .integration-single__content .post-main-content__text h2 + p {
    margin-top: -6px;
}

.post-new .integration-single__content .post-main-content__text p {
    padding-bottom: 0;
}

.post-new .integration-single__content .post-main-content__text p + p {
    padding-top: 16px;
}

.post-new .integration-single__content .post-main-content__text li + li {
    margin-top: 8px;
}

.post-new .integration-single__content .post-main-content__text ol {
    padding-left: 35px;
}

/* "Green List" editor button → Figma "Key actions" grid with green checks.
   Flex rows of two (items read left → right, as written in the editor).
   Write each item as <strong>Title</strong> description. */
.post-new .integration-single__content .post-main-content__text ul.green-list {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    padding: 0;
}

.post-new .integration-single__content .post-main-content__text ul.green-list li {
    flex: 0 0 calc(50% - 12px);
    min-width: 0;
    margin: 0;
    padding-left: 30px;
    color: rgba(0, 0, 0, .75);
    font-size: 16px;
    line-height: 24px;
    letter-spacing: .12px;
}

.post-new .integration-single__content .post-main-content__text ul.green-list li::marker {
    content: none;
}

.post-new .integration-single__content .post-main-content__text ul.green-list li::before {
    top: 0;
    width: 20px;
    height: 20px;
    border-radius: 0;
    background: url("../images/integrations-new/check.svg") center / 20px 20px no-repeat; /* Figma "Check" 22599:111764 */
}

/* Figma title weight is 500; !important beats post-new.css's editor
   strong { font-weight: 600 !important }. */
.post-new .integration-single__content .post-main-content__text ul.green-list li strong {
    display: block;
    margin-bottom: 4px;
    color: #262626;
    font-weight: 500 !important;
}

/* Use-case table: Figma 320/470 columns. */
.post-new .integration-single__content .post-main-content__text .post-table-scroll {
    margin: 0;
}

.post-new .integration-single__content .post-main-content__text th:first-child {
    width: 40.5%;
}

/* Inline CTA: Figma keeps the copy at 400px in this 792px column. */
.post-new .integration-single__content .post-main-content__text .sd-inline-cta {
    margin-top: 56px;
}

@media (min-width: 481px) {
    .post-new .integration-single__content .sd-inline-cta__content {
        width: 464px;
        max-width: 62%;
    }
}

/* FAQ (Blog part): Figma 56px section gap, 32px title gap; the answer spans
   the question column (740px = 792 - 28px icon - 24px gap). */
.post-new .integration-single__content .faq-component__answer {
    padding-right: 52px;
}

/* FAQ (Blog part): Figma 56px section gap, 32px title gap. */
.post-new .integration-single__content .faq--post {
    padding-top: 56px;
}

.post-new .integration-single__content .faq--post .faq__title {
    margin-bottom: 32px;
}

/* ---- Related integrations ---- */

.integration-article .integration-related {
    padding: 96px 0;
    border-top: 1px solid var(--integration-divider);
    background: #fff;
}

.integration-article .integration-related__inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 32px 20px;
}

.integration-article .integration-related__title {
    margin: 0;
    color: var(--integration-ink);
}

.integration-article .integration-related__grid {
    grid-column: 1 / -1;
}

/* ---- Laptop ---- */

@media (max-width: 1199px) {
    .integration-article .integration-single__grid {
        grid-template-columns: minmax(0, 300px) minmax(0, 1fr);
        column-gap: 48px;
    }
}

/* ---- Tablet: one column, summary first ---- */

@media (max-width: 991px) {
    .integration-article .integration-single__grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .integration-article .integration-single__summary {
        padding: 40px 0 32px;
    }


    .integration-article .integration-single__content {
        padding: 16px 0 48px;
    }

    .integration-article .integration-related {
        padding: 64px 0;
    }
}

/* ---- Mobile (Figma 390 frame) ---- */

@media (max-width: 767px) {
    .integration-article [style*="--integration-max-width"] {
        max-width: unset;
    }

    .integration-article .integration-single__summary {
        padding: 32px 0;
    }

    .integration-article .integration-single__button {
        width: 100%;
    }

    .integration-article .integration-single__content {
        padding: 0 0 32px;
    }

    .post-new .integration-single__content .post-main-content__text h2 {
        padding: 32px 0 16px;
    }

    .post-new .integration-single__content .post-main-content__text h2 + p {
        margin-top: 0;
    }

    .post-new .integration-single__content .post-main-content__text ol {
        padding-left: 24px;
    }

    /* One column; Figma mobile lists the left column first, then the right. */
    .post-new .integration-single__content .post-main-content__text ul.green-list {
        flex-direction: column;
        gap: 16px;
    }

    .post-new .integration-single__content .post-main-content__text ul.green-list li {
        flex-basis: auto;
    }

    .post-new .integration-single__content .post-main-content__text ul.green-list li:nth-child(even) {
        order: 1;
    }

    /* Figma keeps the two-column table inside the 350px column (no scroll). */
    .post-new .integration-single__content .post-main-content__text table {
        width: 100%;
        min-width: 0;
    }

    .post-new .integration-single__content .post-main-content__text th,
    .post-new .integration-single__content .post-main-content__text th *,
    .post-new .integration-single__content .post-main-content__text td,
    .post-new .integration-single__content .post-main-content__text td *,
    .post-new .integration-single__content .post-main-content__text tbody tr td:first-child,
    .post-new .integration-single__content .post-main-content__text tbody tr td:first-child * {
        min-width: 0;
        font-size: 14px;
        line-height: 20px;
        letter-spacing: .105px;
    }

    .post-new .integration-single__content .post-main-content__text th,
    .post-new .integration-single__content .post-main-content__text td {
        padding: 12px 16px;
    }

    .post-new .integration-single__content .post-main-content__text th {
        padding-top: 14px;
        padding-bottom: 14px;
    }

    .post-new .integration-single__content .post-main-content__text th:first-child {
        width: 50%;
    }

    /* Figma mobile rows are a fixed 108px (table rows treat height as min-height). */
    .post-new .integration-single__content .post-main-content__text tbody tr {
        height: 108px;
    }

    .post-new .integration-single__content .post-main-content__text .sd-inline-cta {
        margin-top: 32px;
    }

    .post-new .integration-single__content .faq--post {
        padding-top: 32px;
    }

    .post-new .integration-single__content .faq--post .faq__title {
        margin-bottom: 24px;
    }

    /* Figma mobile FAQ keeps 16/24 answers and a 12px gap (the shared
       component shrinks answers to 14/20 on phones elsewhere). */
    .post-new .integration-single__content .faq-component__answer {
        padding-right: 0;
    }

    .post-new .integration-single__content .faq-component__answer-content {
        padding-top: 12px;
        font-size: 16px !important;
        line-height: 24px !important;
        letter-spacing: .12px !important;
    }

    .integration-article .integration-related {
        padding: 48px 0;
    }

    .integration-article .integration-related__inner {
        grid-template-columns: minmax(0, 1fr);
        gap: 24px;
    }

    .integration-article .integration-related__button {
        order: 3;
        width: 100%;
    }
}
