/* The counters card (scripts/counters.js): in the side column at the side cards' top, beside the Dragonewt
   progress card; under the side panel, whose parts open over it. Its colours are the side panel's. */

.pg-counters {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1000001;             /* over the pieces (up to 1000000), under the side panel (1000002) */
    box-sizing: border-box;
    padding: 5px 8px 7px;
    border: 1px solid #30343e;
    border-radius: 8px;
    background: #141519;
    color: #e8e6e1;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
    font: 12px/1.35 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    text-align: left;
}
.pg-counters[hidden] { display: none; }
.pg-counters div { color: inherit; }          /* mystyle.css makes every div white */
.pg-counters button, .pg-counters input { font: inherit; }

.pg-ct-head {
    margin-bottom: 2px;
    color: #9a9ca5 !important;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.pg-ct-row { display: flex; align-items: center; gap: 4px; min-height: 26px; }

/* A counter's name: a click shows its rule */
.pg-ct-name {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 2px 0;
    border: 0;
    background: none;
    color: inherit;
    text-align: left;
    cursor: help;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.pg-ct-name:hover, .pg-ct-name[aria-expanded="true"] { color: #f0c24b; }
.pg-ct-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.25); }
.pg-ct-dot.pg-ct-none { background: transparent; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.18); }
.pg-ct-note {
    margin: 0 0 4px 14px;
    color: #9a9ca5 !important;
    font-size: 11px;
    line-height: 1.35;
}
/* The game's admins, at the foot */
.pg-ct-admins {
    margin-top: 5px;
    padding-top: 4px;
    border-top: 1px solid #30343e;
    color: #9a9ca5 !important;
    font-size: 11px;
}
.pg-ct-sub { margin: -2px 0 3px 14px; color: #f0c24b !important; font-size: 11px; }
.pg-ct-muted { color: #9a9ca5; }

/* − value + */
.pg-ct-ctrl { flex: none; display: flex; align-items: center; gap: 3px; }
.pg-ct-btn {
    flex: none;
    min-width: 24px;
    height: 24px;
    padding: 0 5px;
    border: 1px solid #30343e;
    border-radius: 6px;
    background: #1c1e24;
    color: #e8e6e1;
    line-height: 1;
    cursor: pointer;
}
.pg-ct-btn:hover:not(:disabled) { border-color: #f0c24b; }
.pg-ct-btn:disabled { opacity: 0.35; cursor: default; }
.pg-ct-btn.pg-ct-cur { border-color: #f0c24b; color: #f0c24b; }
.pg-ct-val {
    flex: none;
    padding: 2px 4px;
    border: 1px solid transparent;
    border-radius: 6px;
    background: none;
    color: #e8e6e1;
}
button.pg-ct-val { cursor: pointer; }
button.pg-ct-val:hover { border-color: #30343e; }
.pg-ct-num { min-width: 26px; font-size: 14px; font-weight: 700; text-align: center; font-variant-numeric: tabular-nums; }

/* a text: one line, cut short (all of it in the tooltip and the editor) */
.pg-ct-text {
    flex: 0 1 auto;
    max-width: 62%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: right;
}
.pg-ct-row-text .pg-ct-name { flex: none; max-width: 60%; }    /* the label whole, the text cut short */
.pg-ct-row-text .pg-ct-text { flex: 1 1 auto; min-width: 0; max-width: none; }
.pg-ct-text.pg-ct-empty { color: #9a9ca5; }
.pg-ct-text.pg-ct-over { color: #9a9ca5; text-decoration: line-through; }
.pg-ct-x { min-width: 22px; height: 22px; padding: 0 4px; color: #9a9ca5; }

/* the kept dice: a die per empire */
.pg-ct-dice { display: flex; flex-wrap: wrap; gap: 4px; margin: 0 0 4px 14px; }
.pg-ct-die {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    max-width: 100%;
    padding: 2px 6px;
    border: 1px solid #30343e;
    border-radius: 12px;
    background: #1c1e24;
    color: #9a9ca5;
    font-size: 11px;
}
button.pg-ct-die { cursor: pointer; }
button.pg-ct-die:hover, .pg-ct-die.pg-ct-picking { border-color: #f0c24b; }
.pg-ct-die.pg-ct-on { color: #e8e6e1; }
.pg-ct-die b { min-width: 9px; text-align: center; font-size: 12px; }
.pg-ct-die.pg-ct-on b { color: #f0c24b; }
.pg-ct-who { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pg-ct-pick { display: flex; flex-wrap: wrap; align-items: center; gap: 3px; margin: 0 0 5px 14px; }

/* typing a number, writing a text */
.pg-ct-edit { flex: none; display: flex; align-items: center; gap: 3px; }
.pg-ct-edit.pg-ct-wide { flex: 1 1 100%; margin: 0 0 4px 14px; }
.pg-ct-input {
    box-sizing: border-box;
    width: 58px;
    height: 24px;
    padding: 0 5px;
    border: 1px solid #f0c24b;
    border-radius: 6px;
    background: #0f1013;
    color: #e8e6e1;
    outline: none;
}
.pg-ct-wide .pg-ct-input { flex: 1 1 auto; width: auto; min-width: 0; }
.pg-ct-save { color: #f0c24b; }
