/* ═══════════════════════════════════════════════════════════════════════════
   AI Ops — Integrations page styles

   Ported v0.1.42 from the .NET prototype's `wwwroot/css/integrations.css`.
   Re-skinned from the prototype's light theme (cream/navy/green) to the
   AI Ops dark theme using shared tokens from ai-ops-shared.css. Layout
   structure, search/grid/card markup, and responsive breakpoints are
   preserved verbatim so JS rendering matches.

   Section order (markup in templates/integrations-sections/01-hero-grid.php):
     1. Hero (eyebrow + H1 + intro)
     2. Search bar
     3. Category pills
     4. Count line
     5. Card grid (165 cards rendered by JS)
     6. Empty state (hidden by default)
     7. Bottom CTA panel
   ═══════════════════════════════════════════════════════════════════════════ */

/* ──────────── Page wrap (mirrors home page section padding) ──────────── */
.ai-ops-int-body .ai-ops-int-section {
    padding: var(--ao-section-pad-y, 100px) var(--ao-section-pad-x, 150px);
    position: relative;
}
.ai-ops-int-body .ai-ops-int-wrap {
    max-width: var(--ao-content-max, 1140px);
    margin: 0 auto;
}

/* ──────────── Hero ──────────── */
/* F-87 follow-up (2026-05-23): tightened the gap between the intro
   paragraph and the search bar below it. Previously three padding
   values compounded — the hero section's 72px bottom padding, an
   extra `.ai-ops-int-hero { padding-bottom: 56px; }`, and the grid
   section's 72px top padding — totaling ~200px of dead space. The
   inner 56px is removed; the two adjacent section paddings are
   tightened via the overrides further down. */
.ai-ops-int-body .ai-ops-int-hero {
    text-align: center;
}
/* F-87: localize the section gap reduction to JUST the hero ↔ grid
   junction; other section transitions on this page (if any added
   later) keep the standard 72px rhythm. */
.ai-ops-int-body .ai-ops-int-hero-section {
    padding-bottom: 24px;
}
.ai-ops-int-body .ai-ops-int-grid-section {
    padding-top: 24px;
}
.ai-ops-int-body .ai-ops-int-hero .ai-ops-uc-eyebrow {
    margin: 0 auto 20px;
    justify-content: center;
}
.ai-ops-int-body .ai-ops-int-hero h1 {
    font-family: var(--ao-font);
    font-size: 48px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.96px;
    color: #fff;
    margin: 0 auto 24px;
    max-width: 800px;
}
.ai-ops-int-body .ai-ops-int-intro {
    max-width: 720px;
    margin: 0 auto;
    text-align: center;
    font-family: var(--ao-font);
    font-size: 19px;
    font-weight: 400;
    line-height: 1.6;
    letter-spacing: 0.38px;
    color: var(--ao-text-body, #D2D2D2);
}
.ai-ops-int-body .ai-ops-int-intro strong {
    color: #fff;
    font-weight: 500;
}

/* ──────────── Search bar ──────────── */
.ai-ops-int-body .integrations-search {
    position: relative;
    max-width: 640px;
    margin: 0 auto 28px;
}
.ai-ops-int-body .integrations-search input {
    width: 100%;
    box-sizing: border-box;
    font-family: var(--ao-font);
    font-size: 17px;
    line-height: 1.4;
    letter-spacing: 0.34px;
    color: #fff;
    background: #1A1A1A;
    border: 1px solid var(--ao-border-subtle, #3B3B3B);
    border-radius: 8px;
    padding: 16px 20px 16px 52px;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.ai-ops-int-body .integrations-search input::placeholder {
    color: rgba(255, 255, 255, 0.45);
}
.ai-ops-int-body .integrations-search input:focus {
    border-color: #51A1FF;
    box-shadow: 0 0 0 3px rgba(81, 161, 255, 0.18);
}
.ai-ops-int-body .integrations-search svg {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: rgba(255, 255, 255, 0.5);
    pointer-events: none;
}

/* ──────────── Category pills ──────────── */
.ai-ops-int-body .integrations-cats {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    max-width: 1100px;
    margin: 0 auto 48px;
}
.ai-ops-int-body .integrations-cat {
    font-family: var(--ao-font);
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.28px;
    color: var(--ao-text-body, #D2D2D2);
    background: #1A1A1A;
    border: 1px solid var(--ao-border-subtle, #3B3B3B);
    border-radius: 999px;
    padding: 10px 18px;
    cursor: pointer;
    transition: all 0.15s ease;
}
.ai-ops-int-body .integrations-cat:hover {
    border-color: #51A1FF;
    color: #fff;
}
.ai-ops-int-body .integrations-cat.active {
    background: var(--ao-grad-primary-tighter);
    border-color: transparent;
    color: #21054F;
    font-weight: 600;
}
.ai-ops-int-body .integrations-cat-count {
    margin-left: 6px;
    opacity: 0.7;
    font-size: 12px;
}
.ai-ops-int-body .integrations-cat.active .integrations-cat-count {
    opacity: 0.85;
}

/* ──────────── Count line ──────────── */
.ai-ops-int-body .integrations-count {
    text-align: center;
    margin: 0 auto 20px;
    font-size: 13px;
    color: var(--ao-text-muted, #BCBCBC);
    font-family: var(--ao-font);
}
.ai-ops-int-body .integrations-count strong {
    color: #fff;
    font-weight: 500;
}

/* ──────────── Grid ──────────── */
.ai-ops-int-body .integrations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}
.ai-ops-int-body .integration-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    background: #272727;
    border: 1px solid var(--ao-border-subtle, #3B3B3B);
    border-radius: 12px;
    font-family: var(--ao-font);
    transition: all 0.15s ease;
}
.ai-ops-int-body .integration-card:hover {
    border-color: #51A1FF;
    transform: translateY(-1px);
    box-shadow: 0 8px 32px rgba(81, 161, 255, 0.18);
}
.ai-ops-int-body .integration-logo {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border-radius: 8px;
    position: relative;
    overflow: hidden;
    font-family: var(--ao-font);
    font-weight: 700;
    font-size: 17px;
    letter-spacing: 0;
    color: #fff;
    text-transform: uppercase;
}
.ai-ops-int-body .integration-logo-letter {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ai-ops-int-body .integration-logo-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #fff;
    padding: 6px;
    z-index: 1;
}
.ai-ops-int-body .integration-meta {
    flex: 1;
    min-width: 0;
}
.ai-ops-int-body .integration-name {
    display: block;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ai-ops-int-body .integration-cat {
    display: block;
    font-size: 12px;
    color: var(--ao-text-muted, #BCBCBC);
    letter-spacing: 0.24px;
    margin-top: 2px;
}

/* ──────────── Empty state ──────────── */
.ai-ops-int-body .integrations-empty {
    text-align: center;
    padding: 80px 20px;
    color: var(--ao-text-body, #D2D2D2);
    font-family: var(--ao-font);
    font-size: 17px;
}
.ai-ops-int-body .integrations-empty strong {
    color: #fff;
    font-weight: 500;
}
.ai-ops-int-body .integrations-empty a {
    color: #51A1FF;
    text-decoration: none;
}
.ai-ops-int-body .integrations-empty a:hover {
    text-decoration: underline;
}

/* F-46 (2026-05-21): the standalone .integrations-cta block (gradient
   border card with "Don't see your stack?" CTA) was retired in favor
   of the home-style 2-tile engage section (role-picker + form). The
   home engage CSS now applies because page-ai-ops-integrations.php
   co-classes `ai-ops-home-body` on the body and the integrations
   template enqueues ai-ops-home.css. Old rules removed — nothing
   else uses .integrations-cta. */

/* ──────────── Pagination (F-46) ──────────── */
.ai-ops-int-body .integrations-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 32px;
    padding: 16px 0;
    font-family: var(--ao-font);
}
.ai-ops-int-body .integrations-pagination[hidden] {
    display: none;
}
.ai-ops-int-body .integrations-page-btn {
    background: rgba(255, 255, 255, 0.04);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    padding: 10px 20px;
    font-family: var(--ao-font);
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.28px;
    cursor: pointer;
    transition: background 120ms ease, border-color 120ms ease, color 120ms ease;
}
.ai-ops-int-body .integrations-page-btn:not(:disabled):hover {
    background: rgba(81, 161, 255, 0.14);
    border-color: rgba(81, 161, 255, 0.6);
    color: #fff;
}
.ai-ops-int-body .integrations-page-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}
.ai-ops-int-body .integrations-page-btn:focus-visible {
    outline: 2px solid rgba(151, 199, 255, 0.7);
    outline-offset: 2px;
}
.ai-ops-int-body .integrations-page-status {
    color: var(--ao-text-body, #D2D2D2);
    font-size: 14px;
    letter-spacing: 0.28px;
}
.ai-ops-int-body .integrations-page-status strong {
    color: #fff;
    font-weight: 600;
}

/* ──────────── Responsive ──────────── */
@media (max-width: 1100px) {
    .ai-ops-int-body .ai-ops-int-section {
        padding-left: 32px;
        padding-right: 32px;
    }
}
@media (max-width: 940px) {
    .ai-ops-int-body .ai-ops-int-hero h1 {
        font-size: 36px;
        letter-spacing: 0.72px;
    }
    /* F-46 (2026-05-21): legacy .integrations-cta responsive override
       removed — block was retired in favor of the home engage section. */
}
@media (max-width: 640px) {
    .ai-ops-int-body .integrations-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 12px;
    }
    .ai-ops-int-body .integration-card {
        padding: 12px 14px;
        gap: 10px;
    }
    .ai-ops-int-body .integration-logo {
        width: 36px;
        height: 36px;
        font-size: 15px;
    }
    .ai-ops-int-body .integration-name {
        font-size: 14px;
    }
    .ai-ops-int-body .integrations-cats {
        gap: 8px;
    }
    .ai-ops-int-body .integrations-cat {
        padding: 8px 14px;
        font-size: 13px;
    }
}


/* ═══════════════════════════════════════════════════════════════════════════
   v1.3.7 (2026-05-17, QA-PATCH Task 16): the v1.3.6 .integrations-toggle-*
   rules are gone — Stas reversed the curate-and-toggle pattern in favor
   of "show all 1000+ and let visitors filter." The button no longer
   exists in the template; the styles are deleted to keep the file lean.

   The P1-9 CLS reservation below stays — it's even more important now
   that the default-rendered card count is back to ~3,427.
   ═══════════════════════════════════════════════════════════════════════════ */

/* F-45 (2026-05-21): the previous P1-9 anti-CLS rule below overrode the
   logo-img's `width: 100%; height: 100%` (line 201) with `width: 24px;
   height: 24px;` at the same specificity but lower in the cascade —
   which won. Result: the favicon rendered as a 24×24 square in the
   top-left corner of the 40×40 white tile, leaving the rest of the tile
   visibly empty. The HTML img attrs (width=24 height=24 in the JS) are
   enough for the browser to reserve space pre-load; we don't also need
   a CSS rule fighting the positioning rule above. Removed entirely. */
