/* ============================================================
   PROJECT SEARCH WIDGET
   Extends cb-profile-search-widget.css
   ============================================================ */

@media (max-width: 768px) {
    .gg-custom-widget.gg-project-search {
        padding-left: 0;
        padding-right: 0;
    }
}

.gg-project-search .gg-cbps-title {
    color: var(--gg-secondary);
    margin: 0 0 24px;
}
.gg-project-search h5.gg-cbps-org-name{
    color: var(--gg-filter-label-text);
    
}
.gg-project-search h5.gg-cbps-org-name a{
    font-weight: 400;
}
/* Single-column filter panel */
.gg-ps-filters {
    grid-template-columns: 1fr !important;
    max-width: 320px;
}

/* ── Table grid: Period | Project Name | Country | Partner ── */

.gg-ps-table-header,
.gg-ps-row {
    grid-template-columns: repeat(4, 1fr);
}

.gg-project-search .gg-cbps-table-header {
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.gg-project-search .gg-cbps-row {
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

/* ── Period cell ─────────────────────────────────────────── */

.gg-ps-period {
    font-size: 14px;
    font-weight: 700;
    color: var(--gg-filter-label-text);
}

/* ── Project name cell ───────────────────────────────────── */

.gg-project-search .gg-cbps-cell--name h5.gg-cbps-org-name {
    margin: 0;
}

/* ── Country list (one per line) ─────────────────────────── */

.gg-ps-country-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.gg-ps-country-item {
    font-size: 14px;
    color: var(--gg-filter-label-text);
    line-height: 1.4;
    display: block;
}

/* ── Partner cell ────────────────────────────────────────── */

.gg-ps-partner-wrap {
    display: flex;
    align-items: center;
    gap: 16px;
}

.gg-ps-partner {
    font-size: 14px;
    color: var(--gg-filter-label-text);
    flex: 1;
    min-width: 0;
}

/* Pagination scoped to project search */
.gg-project-search .gg-cbps-btn-page {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--gg-light-green);
    color: var(--gg-secondary);
    border: none;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    padding: 0;
}

.gg-project-search .gg-cbps-btn-page:hover:not(:disabled),
.gg-project-search .gg-cbps-btn-page:focus:not(:disabled) {
    background: var(--gg-secondary);
    color: var(--gg-light);
}

.gg-project-search .gg-cbps-btn-page:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: var(--gg-light-green);
    color: var(--gg-secondary);
}

/* Active chip colour */
.gg-project-search .gg-cbps-active-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 32px;
    padding: 0 12px;
    background: #068241;
    color: var(--gg-light);
    border: none;
    border-radius: 9999px;
    font-family: 'Jost', sans-serif;
    font-size: 14px;
    font-weight: 400;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s;
}

.gg-project-search .gg-cbps-active-chip:hover,
.gg-project-search .gg-cbps-active-chip:focus {
    background: var(--gg-primary);
    color: var(--gg-light);
}

.gg-project-search .gg-cbps-filter-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--gg-secondary);
    color: var(--gg-light);
    border: none;
    border-radius: 100px;
    padding: 0 14px;
    height: 32px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: opacity 0.2s;
}

.gg-project-search .gg-cbps-filter-toggle:hover,
.gg-project-search .gg-cbps-filter-toggle:focus {
    opacity: 0.85;
}

.gg-project-search .gg-cbps-select-btn {
    position: relative;
    display: flex;
    align-items: flex-end;
    width: 100%;
    height: 56px;
    background: var(--gg-light);
    border: 1px solid rgba(88, 87, 75, 0.4);
    border-radius: 12px;
    padding: 6px 32px 6px 8px;
    cursor: pointer;
    text-align: left;
    transition: border-color 0.2s;
    box-sizing: border-box;
    font-size: 16px;
}

.gg-project-search .gg-cbps-select-btn:hover,
.gg-project-search .gg-cbps-select-btn:focus {
    background: var(--gg-light);
    color: unset;
    border-color: var(--gg-secondary);
}

.gg-project-search .gg-cbps-select-btn.is-active {
    border-color: var(--gg-secondary);
}

.gg-project-search .gg-cbps-search-input,
.gg-project-search .gg-cbps-search-input[type=search] {
    position: relative;
    z-index: 0;
    width: 100%;
    border: 1px solid rgba(88, 87, 75, 0.4);
    border-radius: 12px;
    padding: 14px 14px 14px 52px;
    font-size: 16px;
    color: var(--gg-text);
    background: var(--gg-light);
    box-sizing: border-box;
    transition: border-color 0.2s;
    -webkit-appearance: none;
    appearance: none;
    font-family: 'Jost', sans-serif;
}

.gg-project-search .gg-cbps-search-input:focus,
.gg-project-search .gg-cbps-search-input[type=search]:focus {
    outline: none;
    border-color: var(--gg-secondary);
}

.gg-project-search .gg-cbps-reset-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 32px;
    padding: 0 14px 0 10px;
    background: var(--gg-secondary);
    color: var(--gg-light);
    border: none;
    border-radius: 9999px;
    font-family: 'Jost', sans-serif;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s;
}

.gg-project-search .gg-cbps-reset-btn:hover,
.gg-project-search .gg-cbps-reset-btn:focus {
    background: #068241;
    color: var(--gg-light);
}

/* ── Responsive ──────────────────────────────────────────── */

@media (max-width: 1024px) {
    .gg-project-search .gg-cbps-table-header,
    .gg-project-search .gg-cbps-row {
        gap: 12px;
    }
}

@media (max-width: 1280px) {
    .gg-project-search .gg-cbps-table-header {
        display: none;
    }

    .gg-project-search .gg-cbps-row {
        background-color: var(--gg-filter-result);
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 0;
        border-radius: 0;
        width: 100%;
    }

    .gg-project-search .gg-cbps-cell--period,
    .gg-project-search .gg-cbps-cell--name,
    .gg-project-search .gg-cbps-cell--country,
    .gg-project-search .gg-cbps-cell--partner {
        display: flex;
        justify-content: space-between;
        align-items: center;
        border-top: 1px solid rgba(88, 87, 75, 0.15);
        padding: 12px 16px;
        gap: 16px;
        width: 100%;
        box-sizing: border-box;
    }

    .gg-project-search .gg-cbps-cell--period {
        border-top: none;
        padding-top: 16px;
    }

    .gg-project-search .gg-cbps-cell--name h5.gg-cbps-org-name {
        text-align: right;
    }

    .gg-project-search .gg-cbps-cell--mobile-action {
        display: block;
        padding: 12px 16px 16px;
        border-top: 1px solid rgba(88, 87, 75, 0.15);
    }

    .gg-project-search .gg-cbps-details-btn--icon {
        display: none;
    }

    .gg-project-search .gg-cbps-mobile-label {
        display: block;
        flex-shrink: 0;
        color: var(--gg-filter-label-text);
        font-size: 14px;
    }

    .gg-project-search .gg-cbps-search-bar-wrap {
        padding: 16px 16px 16px;
    }

    .gg-project-search .gg-cbps-search-wrap {
        width: 100%;
    }

    .gg-project-search .gg-cbps-results {
        padding: 0 16px 24px;
    }

    .gg-project-search .gg-cbps-pagination {
        padding: 16px;
    }
}
