/* =========================================================================
   Plugin Features – Connections Center block
   ========================================================================= */

.plugin-features {
    background: #171B1D;
    padding: 80px 0;
    color: #fff;
}

.plugin-features__container {
    position: relative;
}

/* ---------- Head ---------- */
.plugin-features__head {
    margin-bottom: 28px;
}

.plugin-features__label {
    display: inline-block;
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 12px;
    background: linear-gradient(101deg, #8feafb 20%, #b4f8db 40%, #b4f8db 60%, #8feafb 80%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.plugin-features__heading {
    font-size: 50px;
    font-weight: 600;
    line-height: 120%;
    color: #fff;
    margin: 0;
}

/* ---------- Search ---------- */
.pf-search {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #333B3F;
    border-radius: 10px;
    padding: 14px 18px;
    margin-bottom: 16px;
}

.pf-search__icon {
    color: #BCC1CD;
    flex-shrink: 0;
}

.pf-search__input {
    flex: 1;
    border: none;
    background: transparent;
    color: #fff;
    font-size: 16px;
    outline: none;
}

.pf-search__input::placeholder {
    color: #8A929C;
}

/* ---------- Filters row ---------- */
.pf-controls {
    margin-bottom: 22px;
}

.pf-filters {
    display: flex;
    gap: 16px;
}

.pf-filters__panel-head {
    display: none;
}

.pf-filter {
    position: relative;
    flex: 1;
    min-width: 0;
}

.pf-filter__toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    background: #333B3F;
    border: none;
    border-radius: 10px;
    padding: 14px 18px;
    color: #fff;
    font-size: 16px;
    font-family: inherit;
    cursor: pointer;
}

.pf-filter__count {
    color: #8feafb;
    font-weight: 600;
}

.pf-filter__chevron {
    color: #BCC1CD;
    transition: transform 0.25s ease;
    flex-shrink: 0;
}

.pf-filter.is-open .pf-filter__chevron {
    transform: rotate(180deg);
}

.pf-filter__panel {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    z-index: 20;
    background: #333B3F;
    border-radius: 10px;
    padding: 10px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
    display: none;
}

.pf-filter.is-open .pf-filter__panel {
    display: block;
}

.pf-filter__options {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 260px;
    overflow-y: auto;
}

.pf-filter__options li {
    margin: 0;
}

/* Custom checkbox */
.pf-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 8px;
    border-radius: 8px;
    cursor: pointer;
    color: #E7EAF0;
    font-size: 15px;
    transition: background 0.2s ease;
}

.pf-checkbox:hover {
    background: rgba(255, 255, 255, 0.05);
}

.pf-checkbox input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.pf-checkbox__box {
    width: 18px;
    height: 18px;
    border-radius: 5px;
    border: 1.5px solid #6B7378;
    flex-shrink: 0;
    position: relative;
    transition: all 0.2s ease;
}

.pf-checkbox input:checked + .pf-checkbox__box {
    background: linear-gradient(101deg, #8feafb, #b4f8db);
    border-color: transparent;
}

.pf-checkbox input:checked + .pf-checkbox__box::after {
    content: "";
    position: absolute;
    left: 5px;
    top: 1px;
    width: 5px;
    height: 10px;
    border: solid #171B1D;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.pf-filter__apply {
    width: 100%;
    margin-top: 8px;
    border: none;
    border-radius: 8px;
    padding: 12px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    color: #0F2A22;
    cursor: pointer;
    background: linear-gradient(101deg, #8feafb 20%, #b4f8db 40%, #b4f8db 60%, #8feafb 80%);
    background-size: 200% auto;
    transition: background-position 0.4s ease;
}

.pf-filter__apply:hover {
    background-position: right center;
}

/* ---------- Result bar ---------- */
.pf-resultbar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
    min-height: 32px;
}

.pf-found {
    font-size: 15px;
    color: #BCC1CD;
}

.pf-found__num {
    color: #fff;
    font-weight: 600;
}

.pf-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.pf-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #333B3F;
    border-radius: 6px;
    padding: 5px 10px;
    font-size: 13px;
    color: #fff;
}

.pf-chip__remove {
    border: none;
    background: transparent;
    color: #BCC1CD;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
}

.pf-chip__remove:hover {
    color: #fff;
}

.pf-clear-all {
    border: none;
    background: transparent;
    color: #8feafb;
    font-size: 13px;
    cursor: pointer;
    text-decoration: underline;
    padding: 5px;
}

/* ---------- App window (decorative chrome) ---------- */
.pf-window {
    background: rgba(51, 59, 63, 0.1);
    border-radius: 18px;
    padding: 10px;
    overflow: hidden;
}

.pf-window__toolbar {
    display: flex;
    align-items: center;
    gap: 16px;
    background: #171B20;
    border-radius: 12px;
    padding: 10px 14px;
    margin-bottom: 10px;
}

.pf-window__leading {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 1;
    min-width: 0;
}

.pf-window__dots {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.pf-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: block;
}

.pf-dot--red { background: #FF5F57; }
.pf-dot--yellow { background: #FEBC2E; }
.pf-dot--green { background: #28C840; }

.pf-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.pf-icon--sm {
    width: 13px;
    height: 13px;
    opacity: 0.85;
}

.pf-toolbar-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.pf-toolbar-actions--trailing {
    flex: 1;
    justify-content: flex-end;
}

.pf-tbtn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #9AA1AB;
    padding: 5px 6px;
    border-radius: 6px;
}

.pf-tbtn--profile {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 5px 9px;
    color: #E7EAF0;
}

.pf-tbtn__label {
    font-size: 12px;
    white-space: nowrap;
}

.pf-tbtn--nav {
    gap: 12px;
    padding: 5px 8px;
}

.pf-window__url {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 320px;
    max-width: 38%;
    background: #333B3F;
    border-radius: 6px;
    padding: 6px 14px;
    font-size: 13px;
    color: #BCC1CD;
}

.pf-url-favicon {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    background: linear-gradient(135deg, #8feafb, #b4f8db);
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.pf-url-favicon svg {
    width: 10px;
    height: 10px;
}

.pf-window__body {
    display: flex;
    align-items: stretch;
}

/* Sidebar (decor) */
.pf-sidebar {
    width: 210px;
    flex-shrink: 0;
    padding: 16px;
    background: transparent;
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.pf-sidebar__logo {
    display: flex;
    align-items: center;
    padding: 0 8px 6px;
}

.pf-sidebar__logo-img {
    height: 22px;
    width: auto;
    display: block;
}

.pf-sidebar__logo-mark {
    display: none;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #8feafb, #b4f8db);
    flex-shrink: 0;
}

.pf-sidebar__logo-mark svg {
    width: 16px;
    height: 16px;
}

.pf-sidebar__nav,
.pf-sidebar__group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.pf-sidebar__group-title {
    font-size: 10px;
    letter-spacing: 0.08em;
    color: #878787;
    padding: 8px;
}

.pf-nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: #B5B5B5;
    padding: 9px 12px;
    border-radius: 8px;
}

.pf-nav-item .pf-icon {
    color: #B5B5B5;
}

.pf-nav-item.is-active {
    background: #8BE8FC;
    color: #171717;
    font-weight: 600;
}

.pf-nav-item.is-active .pf-icon {
    color: #171717;
}

/* Main content */
.pf-main {
    flex: 1;
    min-width: 0;
    padding: 24px 36px;
    background: #121517;
    border-radius: 0 0 0 16px;
}

.pf-main__head {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 24px;
    margin-bottom: 24px;
    background: rgba(51, 59, 63, 0.1);
    border-radius: 18px;
}

.pf-main__title {
    font-size: 28px;
    font-weight: 600;
    color: #fff;
    margin: 0;
}

.pf-main__count {
    background: #121517;
    color: #fff;
    border-radius: 8px;
    padding: 4px 12px;
    font-size: 14px;
}

/* ---------- Cards grid ---------- */
.pf-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    transition: opacity 0.2s ease;
}

.pf-grid.is-loading {
    opacity: 0.5;
    pointer-events: none;
}

.pf-empty {
    grid-column: 1 / -1;
    text-align: center;
    color: #BCC1CD;
    padding: 40px 0;
}

.pf-card {
    position: relative;
    background: #fff;
    border: 1px solid #828282;
    border-radius: 8px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.pf-card:hover {
    box-shadow: 4px 4px 0 0 #8BE8FC;
    transform: translateY(-2px);
}

.pf-card__top {
    flex: 1;
}

.pf-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.04em;
    border-radius: 20px;
    padding: 4px 10px;
    margin-bottom: 12px;
}

.pf-badge--new {
    background: #181B1D;
    color: #fff;
}

.pf-badge--ofn {
    background: #B4F8DB;
    color: #308E66;
}

.pf-card__logo {
    height: 48px;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
}

.pf-card__logo img {
    max-height: 48px;
    max-width: 70%;
    width: auto;
    object-fit: contain;
}

.pf-card__title {
    font-size: 16px;
    font-weight: 700;
    color: #2E2E2E;
    margin: 0 0 6px;
    line-height: 130%;
}

.pf-card__desc {
    font-size: 14px;
    line-height: 140%;
    color: #2E2E2E;
    margin: 0;
}

.pf-card__more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 16px;
    font-size: 14px;
    font-weight: 500;
    color: #2E2E2E;
    text-decoration: none;
}

.pf-card__more svg {
    transition: transform 0.2s ease;
}

.pf-card__more:hover svg {
    transform: translateX(3px);
}

/* Animated bottom bar on hover */
.pf-card__hover-bar {
    position: absolute;
    left: 0;
    bottom: 0;
    height: 4px;
    width: 100%;
    background: #171B1D;
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 0.35s ease;
}

.pf-card:hover .pf-card__hover-bar {
    transform: scaleX(1);
}

/* ---------- Pagination ---------- */
.pf-pagination-wrap {
    margin-top: 26px;
}

.pf-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.pf-page-arrow,
.pf-page-number {
    min-width: 34px;
    height: 34px;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: #BCC1CD;
    font-size: 14px;
    font-family: inherit;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, color 0.2s ease;
}

.pf-page-number:hover:not(.is-active) {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.pf-page-number.is-active {
    background: linear-gradient(101deg, #8feafb, #b4f8db);
    color: #0F2A22;
    font-weight: 600;
}

.pf-page-numbers {
    display: flex;
    gap: 6px;
}

.pf-page-arrow:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

/* ---------- Loader ---------- */
.pf-loader {
    display: none;
    justify-content: center;
    padding: 20px 0;
}

.pf-loader:not([hidden]) {
    display: flex;
}

.pf-loader span {
    width: 26px;
    height: 26px;
    border: 3px solid rgba(255, 255, 255, 0.2);
    border-top-color: #8feafb;
    border-radius: 50%;
    animation: pf-spin 0.8s linear infinite;
}

@keyframes pf-spin {
    to { transform: rotate(360deg); }
}

/* ---------- Mobile filters toggle ---------- */
.pf-filters-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    background: #333B3F;
    border: none;
    border-radius: 10px;
    padding: 14px 18px;
    color: #fff;
    font-size: 16px;
    font-family: inherit;
    cursor: pointer;
}

.pf-filters-toggle__count {
    color: #8feafb;
}

body.pf-no-scroll {
    overflow: hidden;
}

/* =========================================================================
   Responsive
   ========================================================================= */
@media screen and (max-width: 1199.98px) {
    .pf-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .plugin-features__heading {
        font-size: 40px;
    }
}

@media screen and (max-width: 1023.98px) {
    .pf-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .pf-sidebar {
        width: 160px;
    }
}

@media screen and (max-width: 767.98px) {
    .plugin-features {
        padding: 50px 0;
    }

    .plugin-features__heading {
        font-size: 30px;
    }

    /* --- Decorative window: hide mac controls + all action buttons, keep only the URL bar --- */
    .pf-window__dots,
    .pf-toolbar-actions,
    .pf-tbtn {
        display: none !important;
    }

    .pf-window__toolbar {
        gap: 0;
        padding: 8px;
    }

    .pf-window__leading {
        flex: none;
    }

    .pf-window__url {
        flex: 1;
        width: auto;
        max-width: none;
    }

    /* --- Sidebar stays but icon-only --- */
    .pf-sidebar {
        display: flex;
        width: 56px;
        padding: 12px 6px;
        gap: 18px;
        align-items: center;
    }

    .pf-sidebar__logo {
        padding: 0 0 4px;
        justify-content: center;
    }

    .pf-sidebar__logo-img { display: none; }
    .pf-sidebar__logo-mark { display: inline-flex; }

    .pf-sidebar__nav,
    .pf-sidebar__group {
        align-items: center;
        gap: 6px;
        width: 100%;
    }

    .pf-sidebar__group-title { display: none; }

    .pf-nav-item {
        justify-content: center;
        padding: 9px;
        gap: 0;
    }

    .pf-nav-item span { display: none; } /* labels hidden, icons remain */

    .pf-main {
        padding: 14px;
        border-radius: 0 0 0 6px;
    }

    .pf-main__head {
        padding: 10px 14px;
        border-radius: 4px;
        margin-bottom: 16px;
    }

    .pf-main__title { font-size: 22px; }

    .pf-card { border-radius: 4px; }

    /* --- Filters: off-canvas left drawer (315px), not full width --- */
    .pf-filters-toggle {
        display: flex;
    }

    .pf-filters-backdrop {
        position: fixed;
        inset: 0;
        z-index: 100000;
        background: rgba(0, 0, 0, 0.5);
    }

    .pf-filters-backdrop[hidden] { display: none; }

    .pf-filters {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        z-index: 100001;
        width: 315px;
        max-width: 85vw;
        flex-direction: column;
        gap: 12px;
        background: #171B1D;
        padding: 15px;
        overflow-y: auto;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }

    .pf-filters.is-open {
        transform: translateX(0);
    }

    .pf-filters__panel-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding-bottom: 15px;
        border-bottom: 1px solid #5A6469;
        font-size: 18px;
        font-weight: 600;
        color: #fff;
    }

    .pf-filters-close {
        border: none;
        background: #333B3F;
        color: #fff;
        cursor: pointer;
        width: 36px;
        height: 36px;
        border-radius: 4px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    /* Collapsed select rows */
    .pf-filter {
        flex: none;
    }

    .pf-filter__toggle {
        background: #333B3F;
        border-radius: 10px;
        padding: 15px 14px;
    }

    .pf-filter.is-open .pf-filter__toggle {
        border-radius: 10px 10px 0 0;
    }

    /* Expanded options panel */
    .pf-filter__panel {
        position: static;
        box-shadow: none;
        background: #485055;
        border-radius: 0 0 10px 10px;
        padding: 0;
        display: block;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }

    .pf-filter.is-open .pf-filter__panel {
        max-height: 340px;
        overflow-y: auto;
    }

    .pf-filter__options {
        max-height: none;
    }

    .pf-filter__options li:not(:last-child) .pf-checkbox {
        border-bottom: 1px solid #5C6972;
    }

    .pf-checkbox {
        border-radius: 0;
        padding: 12px 14px;
    }

    .pf-checkbox:hover { background: transparent; }

    .pf-filter__apply {
        margin: 12px 14px 14px;
        width: calc(100% - 28px);
    }

    .pf-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
}
