/* =========================================================================
   Portfolio filter bar
   Uses design system variables from light.css / common.css
   ========================================================================= */

#domain-portfolio-filters {
    width: 100%;
    flex-shrink: 0;
}

.pf-filter-row {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
    align-items: stretch;        /* ← was flex-end, now stretch */
    padding: 8px 10px;
    background: var(--header-background-color);
    border: 1px solid var(--splitter-color);
    border-radius: var(--default-border-radius);
}

.pf-filter-field {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.pf-filter-label {
    font-family: var(--default-label-font);
    font-size: 10px;
    font-weight: 400;
    color: var(--form-control-color);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin: 0;
}

.pf-filter-select {
    font-family: var(--input-font-family);
    font-size: 13px;
    color: var(--form-control-color);
    background-color: var(--form-control-background-color);
    border: 1px solid var(--form-control-border-color);
    border-radius: var(--default-border-radius);
    padding: 4px 24px 4px 8px;
    min-width: 180px;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23888'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    cursor: pointer;
    box-shadow: var(--button-box-shadow);
}

.pf-filter-select:focus {
    outline: none;
    border-color: var(--form-control-border-focus-color);
    box-shadow: 0 0 0 2px rgba(128, 189, 255, 0.25);
}

.pf-filter-select:hover {
    border-color: var(--form-control-border-focus-color);
}

/* =========================================================================
   Dark mode
   ========================================================================= */
   
body.dark-mode .pf-filter-group {
    background: var(--panel-background-color);
    border-color: var(--splitter-color);
}

body.dark-mode .pf-filter-row {
    background: var(--header-background-color);
    border-color: var(--splitter-color);
}

body.dark-mode .pf-filter-label {
    color: var(--subheading-text-color);
}

body.dark-mode .pf-filter-select {
    background-color: var(--form-control-background-color);
    border-color: var(--form-control-border-color);
    color: var(--form-control-color);
}

.pf-filter-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: var(--panel-background-color);
    border: 1px solid var(--splitter-color);
    border-radius: var(--default-border-radius);
    padding: 6px 10px 8px 10px;
}

.pf-filter-group-label {
    font-family: var(--default-label-font);
    font-size: 11px;
    font-weight: 700;
    color: var(--subheading-text-color);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding-bottom: 5px;
    border-bottom: 1px dotted var(--subheading-text-color);
    margin-bottom: 4px;
    opacity: 0.85;
}

.pf-filter-group-fields {
    display: flex;
    flex-direction: row;
    gap: 8px;
    align-items: flex-end;
    flex: 1;                     /* ← take remaining vertical space */
}

.pf-filter-input {
    font-family: var(--input-font-family);
    font-size: 13px;
    color: var(--form-control-color);
    background-color: var(--form-control-background-color);
    border: 1px solid var(--form-control-border-color);
    border-radius: var(--default-border-radius);
    padding: 4px 8px;
    min-width: 160px;
    box-shadow: var(--button-box-shadow);
    box-sizing: border-box;
}

.pf-filter-input:focus {
    outline: none;
    border-color: var(--form-control-border-focus-color);
    box-shadow: 0 0 0 2px rgba(128, 189, 255, 0.25);
}

.pf-filter-field-range {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.pf-range-inputs {
    display: flex;
    flex-direction: row;
    gap: 4px;
    align-items: center;
}

.pf-range-input {
    width: 80px !important;
}

.pf-error-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background-color: var(--error-text-color);
    color: #ffffff;
    font-size: 10px;
    font-weight: 700;
    margin-left: 5px;
    cursor: help;
    vertical-align: middle;
    line-height: 1;
}
