/* pickers.css — the group sidebar and group editor modal (group_editor.js)
 * and the people picker popover (people_popover.js); both use the gp-*
 * checklist rows. Loaded with components.css before each dashboard's
 * styles.css. Accent colors come from the dashboard's --accent variables.
 */

/* =========================================================================
   Group sidebar (group_editor.js)
   ========================================================================= */
.group-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 12px;
    margin-bottom: 3px;
    border-radius: 8px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.12s;
}

.group-item:hover {
    background: #fff;
    border-color: rgb(226 232 240);
}

.group-item.active {
    background: #fff;
    border-color: rgb(203 213 225);
    box-shadow:
        0 1px 2px rgba(15, 23, 42, 0.04),
        inset 0 0 0 1px rgba(15, 23, 42, 0.02);
}

.group-item.active::before {
    content: "";
    position: absolute;
    left: 0;
    top: 8px;
    bottom: 8px;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: var(--accent);
}

.group-item .g-name {
    font-size: 13px;
    font-weight: 600;
    color: rgb(15 23 42);
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.group-item .g-sub {
    font-size: 11px;
    color: rgb(148 163 184);
    margin-top: 2px;
    line-height: 1.2;
}

.group-item .g-actions {
    display: flex;
    align-items: center;
    gap: 2px;
    opacity: 0;
    transition: opacity 0.12s;
    flex: none;
}

.group-item:hover .g-actions {
    opacity: 1;
}

.group-item .g-act-btn {
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    border-radius: 6px;
    color: rgb(148 163 184);
    background: none;
    border: none;
    cursor: pointer;
    transition: all 0.12s;
}

.group-item .g-act-btn:hover {
    background: rgb(241 245 249);
    color: rgb(51 65 85);
}

.group-item .g-act-btn.g-act-danger:hover {
    background: rgb(255 241 242);
    color: rgb(190 18 60);
}

.group-item .g-star {
    color: rgb(234 179 8);
}

.group-item .g-star.is-off {
    color: rgb(203 213 225);
}

/* =========================================================================
   Record drill-down rows (chart bar -> slide-over)
   ========================================================================= */
.rec-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 4px;
    border-bottom: 1px solid rgb(241 245 249);
    cursor: pointer;
    transition: background 0.12s;
}

.rec-row:last-child {
    border-bottom: 0;
}

.rec-row:hover {
    background: rgb(248 250 252);
}

/* =========================================================================
   Group picker (checkbox list inside the modal)
   ========================================================================= */
.gp-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 10px;
    border-radius: 7px;
    cursor: pointer;
    transition: background 0.12s;
}

.gp-item:hover {
    background: rgb(248 250 252);
}

.gp-item.checked {
    background: var(--accent-soft);
}

.gp-item input[type="checkbox"] {
    width: 15px;
    height: 15px;
    flex: none;
    cursor: pointer;
}

/* =========================================================================
   People popover (milestone assignee picker, timeline people filter, and the
   employees Overview table's People filter)
   ========================================================================= */
.people-pop {
    width: 520px;
    max-width: calc(100vw - 16px);
    background: #fff;
    border: 1px solid rgb(226 232 240);
    border-radius: 10px;
    box-shadow: 0 12px 32px -8px rgba(15, 23, 42, 0.25);
    padding: 8px;
    /* Above sticky gantt date headers (z 3-4) and the #ms-modal layer (z 60). */
    z-index: 9999;
}

.people-pop-search {
    padding: 2px 2px 8px;
}

.people-pop-cols {
    display: flex;
    gap: 8px;
}

.people-pop-col {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.people-pop-col-head {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: rgb(148 163 184);
    padding: 0 4px 4px;
}

.people-pop-list,
.people-pop-selected {
    height: 260px;
    overflow-y: auto;
    border: 1px solid rgb(226 232 240);
    border-radius: 8px;
    padding: 4px;
}

.people-pop-selected {
    background: rgb(248 250 252 / 0.4);
}

/* Small round initials badge on an assignee button. */
.ms-assign-chip {
    display: inline-grid;
    place-items: center;
    width: 18px;
    height: 18px;
    border-radius: 9999px;
    background: rgb(226 232 240);
    color: rgb(51 65 85);
    font-size: 9px;
    font-weight: 600;
    line-height: 1;
}

/* Right-hand "in this group" pane (mirrors the employee dashboard) */
.gp-sel-item {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 7px 8px 7px 10px;
    border-radius: 7px;
    transition: background 0.12s;
}

.gp-sel-item:hover {
    background: rgb(248 250 252);
}

.gp-sel-remove {
    display: grid;
    place-items: center;
    width: 22px;
    height: 22px;
    border-radius: 6px;
    color: rgb(148 163 184);
    background: none;
    border: none;
    cursor: pointer;
    flex: none;
    transition: all 0.12s;
}

.gp-sel-remove:hover {
    background: rgb(255 241 242);
    color: rgb(190 18 60);
}

/* =========================================================================
   group_editor.js: "Who sees it" in the group modal
   ========================================================================= */
.g-visibility {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: -6px 0 16px;
}
.g-visibility-label {
    font-size: 13px;
    color: #475569;
}
.g-visibility-note {
    font-size: 13px;
    font-weight: 500;
    color: #0f172a;
}
.g-visibility-segs {
    display: inline-flex;
    padding: 2px;
    background: #f1f5f9;
    border-radius: 8px;
}
.g-visibility-segs button {
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 500;
    color: #475569;
    background: transparent;
    border: 0;
    border-radius: 6px;
    cursor: pointer;
}
.g-visibility-segs button[aria-pressed="true"] {
    color: #0f172a;
    background: #fff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.12);
}

/* =========================================================================
   Project groups: "How projects get in" (portfolio's group_rule.js)
   ========================================================================= */
.g-rule {
    margin: 4px 0 14px;
    padding-top: 14px;
    border-top: 1px solid #e2e8f0;
}
.g-rule-head,
.g-rule-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #64748b;
    margin-bottom: 8px;
}
.g-rule-modes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px;
}
.g-rule-mode {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 12px 14px;
    text-align: left;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    cursor: pointer;
    transition: border-color 0.12s, box-shadow 0.12s, background 0.12s;
}
.g-rule-mode:hover {
    border-color: #94a3b8;
}
.g-rule-mode[aria-checked="true"] {
    border-color: var(--accent);
    background: var(--accent-soft);
    box-shadow: 0 0 0 1px var(--accent);
}
.g-rule-icon {
    display: grid;
    flex: none;
    place-items: center;
    width: 34px;
    height: 34px;
    color: #64748b;
    background: #f1f5f9;
    border-radius: 8px;
}
.g-rule-mode[aria-checked="true"] .g-rule-icon {
    color: #fff;
    background: var(--accent);
}
.g-rule-mode b {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #0f172a;
}
.g-rule-mode small {
    display: block;
    margin-top: 2px;
    font-size: 12px;
    line-height: 1.4;
    color: #64748b;
}
.g-rule-panel {
    margin-top: 12px;
    padding: 14px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
}
.g-rule-fields {
    display: flex;
    flex-wrap: wrap;
    gap: 16px 28px;
}
.g-rule-through {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}
.g-rule-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    margin-top: 14px;
    font-size: 12px;
    color: #64748b;
}
.g-rule-presets span {
    margin-right: 4px;
}
.g-rule-presets button {
    padding: 3px 10px;
    font-size: 12px;
    color: #334155;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    cursor: pointer;
}
.g-rule-presets button:hover {
    border-color: #94a3b8;
}
.g-rule-presets button.is-on {
    color: #0f172a;
    border-color: var(--accent);
    background: var(--accent-soft);
}
.g-rule-summary {
    margin-top: 12px;
    font-size: 13px;
    line-height: 1.5;
    color: #334155;
}
.g-rule-preview {
    margin-top: 12px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}
.g-rule-preview-head {
    display: flex;
    justify-content: space-between;
    padding: 8px 12px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #64748b;
    border-bottom: 1px solid #f1f5f9;
}
.g-rule-count {
    font-family: "IBM Plex Mono", monospace;
    letter-spacing: 0;
    text-transform: none;
    color: #0f172a;
}
.g-rule-list {
    max-height: 200px;
    overflow-y: auto;
    padding: 4px;
    transition: opacity 0.12s;
}
.g-rule-list.is-loading {
    opacity: 0.45;
}
.g-rule-item {
    display: flex;
    gap: 10px;
    align-items: baseline;
    padding: 4px 8px;
    font-size: 12px;
    border-radius: 4px;
}
.g-rule-item:nth-child(odd) {
    background: #f8fafc;
}
.g-rule-item b {
    flex: none;
    font-weight: 500;
    color: #0f172a;
}
.g-rule-item span {
    overflow: hidden;
    color: #94a3b8;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.g-rule-empty {
    padding: 20px 12px;
    font-size: 12px;
    text-align: center;
    color: #94a3b8;
}
.g-rule-empty.is-error {
    color: rgb(190 18 60);
}
