/* =========================================
   FEATURE 15: CUSTOM MATCH GROUP FILTER (Synced Layout)
   ========================================= */

:root {
    --row-height: 50px; 
    --header-height: 45px; 
}

/* --- WRAPPER --- */
.filter-panel-wrapper {
    display: flex;
    gap: 12px;
    height: 100%;
    overflow-x: auto;
    padding-bottom: 10px;
    align-items: flex-start;
    flex: 1;
    min-width: 0; 
}

/* --- COLUMN CARD --- */
.filter-column {
    flex: 0 0 140px;
    background: var(--panel-color);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    transition: transform 0.2s;
}

/* CREATOR COLUMN */
.creator-column { 
    flex: 0 0 240px;
    border: 1px solid var(--brand-blue); 
    box-shadow: 0 0 15px rgba(0, 66, 122, 0.15); 
    position: sticky; 
    left: 0;
    z-index: 10;
}

.saved-column {
    background: #162032;
    border-top: 3px solid var(--brand-blue);
}

/* --- HEADER --- */
.col-header {
    height: var(--header-height);
    background: rgba(30, 41, 59, 0.8);
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: space-between; 
    padding: 0 8px;
    font-size: 0.75rem;
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
}

.col-title { 
    flex: 1; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; 
    color: var(--text-muted);
}
.creator-column .col-title { color: #fff; font-size: 0.85rem; }

.col-actions { display: flex; gap: 2px; }

/* Icons */
.icon-btn {
    background: transparent; border: none; color: var(--text-muted); 
    cursor: pointer; font-size: 0.8rem; transition: color 0.2s; padding: 4px;
    border-radius: 4px;
}
.icon-btn:hover { color: var(--brand-yellow); background: rgba(255, 204, 0, 0.1); }
.icon-btn.delete:hover { color: var(--val-bad); background: rgba(239, 68, 68, 0.15); }

/* --- BODY --- */
.col-body {
    display: flex;
    flex-direction: column;
    padding: 0;
}

.filter-row {
    height: var(--row-height);
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 0 2px;
    transition: background 0.1s;
    background: rgba(255,255,255,0.03);
    /* Space for Highlight Border */
    border-left: 2px solid transparent; 
}
.filter-row:last-child { border-bottom: none; }

/* HIGHLIGHT STYLE */
.filter-row.row-highlight {
    background: rgba(255, 204, 0, 0.15) !important;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.1);
    border-left-color: var(--brand-yellow);
}
.filter-row:hover { background: rgba(255, 255, 255, 0.1); }

/* Buttons */
.btn-group { display: flex; gap: 1px; width: 100%; justify-content: center; }

.outcome-btn {
    width: 24px; height: 24px; 
    background: #0f172a; 
    border: 1px solid #334155;
    border-radius: 4px;
    color: #64748b;
    font-size: 11px; font-weight: 700;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.1s;
    font-family: inherit; 
}

.creator-column .outcome-btn { width: 28px; height: 28px; font-size: 13px; }
.creator-column .outcome-btn:hover:not(.selected) { border-color: var(--brand-blue); color: #fff; }

.outcome-btn.selected {
    background: var(--brand-blue);
    color: #fff;
    border-color: var(--brand-blue);
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.saved-column .outcome-btn { cursor: default; border-color: transparent; background: rgba(255,255,255,0.05); }
.saved-column .outcome-btn:not(.selected) { opacity: 0.1; color: transparent; }
.saved-column .outcome-btn.selected { opacity: 1; background: var(--brand-blue); color: #fff; }

/* --- FOOTER --- */
.col-footer {
    padding: 10px;
    background: rgba(0,0,0,0.2);
    border-top: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: auto; 
}

/* Stepper Controls */
.stepper-row { display: flex; justify-content: space-between; gap: 5px; transition: opacity 0.2s; }
.stepper-row.disabled-state { opacity: 0.3; pointer-events: none; }

.stepper-group { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.stepper-label { font-size: 0.65rem; color: var(--brand-yellow); font-weight: 700; }

.stepper-control { display: flex; align-items: center; }

.step-btn { 
    width: 22px; height: 26px; 
    background: #334155; border: 1px solid rgba(255,255,255,0.1);
    color: #fff; font-size: 0.8rem; font-weight: 700; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: 0.1s;
}
.step-btn:hover { background: #475569; }
.step-btn.minus { border-radius: 4px 0 0 4px; border-right: none; }
.step-btn.plus { border-radius: 0 4px 4px 0; border-left: none; }

.stepper-val {
    width: 36px; height: 26px; 
    background: #0f172a; border: 1px solid rgba(255,255,255,0.1);
    color: #fff; text-align: center; padding: 0;
    font-family: inherit; font-size: 0.9rem; font-weight: 700;
    outline: none; 
    -moz-appearance: textfield;
    -webkit-appearance: none; 
    appearance: none;           
}
.stepper-val::-webkit-outer-spin-button, 
.stepper-val::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* Category Select */
.custom-select-container { position: relative; width: 100%; margin-top: 5px; }
.select-label { display: block; font-size: 0.65rem; color: var(--brand-yellow); font-weight: 700; margin-bottom: 2px; }

.custom-select-trigger {
    width: 100%; background: #0f172a; border: 1px solid #334155;
    color: #fff; padding: 6px 10px; border-radius: 4px;
    font-size: 0.75rem; cursor: pointer; display: flex; justify-content: space-between; align-items: center;
}
.custom-select-trigger:hover { border-color: var(--brand-blue); }

.custom-options {
    position: absolute; bottom: 100%; left: 0; right: 0;
    background: #1e293b; border: 1px solid var(--brand-blue);
    border-radius: 4px; z-index: 100; display: none; flex-direction: column;
    max-height: 150px; overflow-y: auto;
    box-shadow: 0 -5px 20px rgba(0,0,0,0.5);
}
.custom-options.open { display: flex; }
.custom-option { padding: 8px 10px; color: #f1f5f9; font-size: 0.75rem; cursor: pointer; border-bottom: 1px solid rgba(255,255,255,0.05); }
.custom-option:hover { background: var(--brand-blue); }

/* Add Button */
.btn-add {
    width: 100%; background: var(--brand-blue); color: #fff;
    border: 1px solid rgba(255,255,255,0.1); padding: 8px;
    border-radius: 6px; font-weight: 600; cursor: pointer;
    display: flex; align-items: center; justify-content: center; gap: 8px;
    font-size: 0.8rem; margin-top: 4px; transition: all 0.2s;
}
.btn-add:hover:not(:disabled) { background: var(--brand-blue-hover); border-color: var(--brand-yellow); }
.btn-add:active:not(:disabled) { transform: scale(0.98); }
.btn-add:disabled { background: #334155; color: #64748b; cursor: not-allowed; opacity: 0.7; }

/* Saved Info Tags */
.info-tag {
    font-size: 0.7rem; color: #cbd5e1; background: rgba(255,255,255,0.05);
    padding: 4px; border-radius: 4px; text-align: center;
    border: 1px solid rgba(255,255,255,0.05); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}