/* Channel Connection Page — Sidebar layout matching Figma design */


body.category-channel-connection #all-content-wrapper {
    overflow: visible;
}

/* Full-width wrapper override (category.php adds this class) */
.connection-page {
    padding-top: 0 !important;
}

.connections-table-wrapper.channel-connection-page {
    padding: 40px 0;
}

.channel-connection-container {
    width: 100%;
}

/* ── Main Layout ─────────────────────────────────────────── */
.channel-connection-layout {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

/* ── Left Sidebar ────────────────────────────────────────── */
.channel-connection-sidebar {
    width: 319px;
    flex-shrink: 0;
    align-self: flex-start; /* must be flex-start for position:sticky to work inside flexbox */
    background: #fff;
    border-radius: 5px;
    box-shadow: 0 4px 17px rgba(0, 0, 0, 0.1);
    position: -webkit-sticky;
    position: sticky;
    top: 100px;
    overflow: hidden;
}

/* Search Box */
.channel-connection-sidebar .connection-search {
    position: relative;
    padding: 15px 14px 0;
}

.channel-connection-sidebar .connection-search input {
    width: 100%;
    padding: 11px 42px 11px 15px;
    border: 1px solid #6cacd2;
    border-radius: 10px;
    font-size: 15px;
    color: #353535;
    outline: none;
    box-sizing: border-box;
    font-family: 'Roboto', sans-serif;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.channel-connection-sidebar .connection-search input::placeholder {
    color: #999;
}

.channel-connection-sidebar .connection-search input:focus {
    border-color: #4cb2ed;
    box-shadow: 0 0 0 3px rgba(76, 178, 237, 0.15);
}

.cc-search-icon {
    position: absolute;
    right: 25px;
    top: 50%;
    /* transform: translateY(-50%); */
    width: 18px;
    height: 18px;
    color: #666;
    pointer-events: none;
}

/* Sidebar Category Nav */
.channel-sidebar-nav {
    margin-top: 10px;
}

.channel-sidebar-item {
    display: flex;
    align-items: center;
    width: 100%;
    text-align: left;
    padding: 14px 20px;
    background: none;
    border: none;
    border-bottom: 1px solid #e2e2e2;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: #0377be;
    font-family: 'Raleway', sans-serif;
    transition: background 0.2s ease, color 0.2s ease;
    position: relative;
    line-height: 1.3;
}

.channel-sidebar-item:last-child {
    border-bottom: none;
}

.channel-sidebar-item:hover:not(.active) {
    background: #f0f7ff;
    color: #0355b6;
}

.channel-sidebar-item.active {
    background: #4cb2ed;
    color: #fff;
    border-bottom-color: transparent;
}

/* Right-facing chevron on active item */
.channel-sidebar-item.active::after {
    content: '';
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
    border-left: 8px solid rgba(255, 255, 255, 0.75);
}

/* Hide auto-generated count badges inside sidebar */
.channel-connection-sidebar .count-badge {
    display: none !important;
}

/* ── Content Area ────────────────────────────────────────── */
.channel-connection-content {
    flex: 1;
    min-width: 0;
}

/* 3-column grid matching the Figma */
.channel-connection-content .products-grid {
    grid-template-columns: repeat(3, 1fr);
}

/* Cards — blue top accent replicating Figma's layered card design */
.channel-connection-content .product-card {
    border: 1px solid #e2e2e2;
    border-top: 4px solid #4cb2ed;
    border-radius: 10px;
}

.channel-connection-content .product-card:hover {
    border-top-color: #0377be;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    transform: translateY(-3px);
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 1200px) {
    .channel-connection-content .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 992px) {
    .channel-connection-layout {
        flex-direction: column;
    }

    .channel-connection-sidebar {
        width: 100%;
        position: static;
    }

    /* Switch to horizontal pill-style filters on tablet/mobile */
    .channel-sidebar-nav {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        padding: 12px 14px 14px;
        margin-top: 6px;
    }

    .channel-sidebar-item {
        width: auto;
        flex: 0 0 auto;
        border: 1px solid #6cacd2;
        border-radius: 20px;
        padding: 7px 16px;
        font-size: 13px;
    }

    .channel-sidebar-item:last-child {
        border-bottom: 1px solid #6cacd2;
    }

    .channel-sidebar-item.active {
        border-color: #4cb2ed;
    }

    .channel-sidebar-item.active::after {
        display: none;
    }

    .channel-connection-content .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .channel-connection-content .products-grid {
        grid-template-columns: 1fr;
    }
}