/* Meta Guide public table — compact release / region / type columns */

#active-duty-table {
    table-layout: fixed;
    width: 100%;
}

#active-duty-table th {
    white-space: nowrap;
}

#active-duty-table > tbody > tr > td,
#active-duty-table > thead > tr > th {
    padding: 0.45rem 0.4rem;
    vertical-align: middle;
    line-height: 1.3;
}

/* Column widths */
#active-duty-table col.active-duty-col-release {
    width: 2.85rem;
}

#active-duty-table col.active-duty-col-region {
    width: 2.4rem;
}

#active-duty-table col.active-duty-col-doll {
    width: 17%;
}

#active-duty-table col.active-duty-col-type {
    width: 6.5rem;
}

#active-duty-table col.active-duty-col-v {
    width: 2.25rem;
}

#active-duty-table col.active-duty-col-teams {
    width: 9%;
}

#active-duty-table col.active-duty-col-weapon {
    width: 9.5rem;
}

#active-duty-table col.active-duty-col-priority {
    width: 7.25rem;
}

#active-duty-table col.active-duty-col-notes {
    width: 28%;
}

#active-duty-table .active-duty-th-release,
#active-duty-table .active-duty-th-region {
    text-align: center;
    font-size: 0.72rem;
    letter-spacing: 0.03em;
    padding-left: 0.15rem;
    padding-right: 0.15rem;
}

.active-duty-release-cell,
.active-duty-region-cell {
    text-align: center;
    vertical-align: middle;
    padding: 0.35rem 0.25rem !important;
}

.active-duty-doll-cell {
    padding-left: 0.45rem !important;
    padding-right: 0.45rem !important;
    vertical-align: middle;
}

.active-duty-doll-cell .d-inline-flex {
    min-width: 0;
}

.active-duty-doll-label {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.1rem;
    min-width: 0;
}

.active-duty-platoon-best {
    font-size: 0.72rem;
    line-height: 1.2;
    white-space: nowrap;
}

.active-duty-rec-teams {
    font-size: 0.85rem;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.active-duty-notes-cell {
    min-width: 8rem;
    padding-right: 0.65rem !important;
}

/* Notes markdown: wrapper does not add a box (fixes extra height on single-line notes) */
#active-duty-table .active-duty-notes-body.markdown-body {
    display: contents;
    line-height: inherit;
}

#active-duty-table .active-duty-notes-body p {
    margin: 0;
    display: inline;
}

#active-duty-table .active-duty-notes-body p + p {
    display: block;
    margin-top: 0.35rem;
}

#active-duty-table .active-duty-notes-body ul,
#active-duty-table .active-duty-notes-body ol,
#active-duty-table .active-duty-notes-body pre,
#active-duty-table .active-duty-notes-body blockquote {
    display: block;
    margin: 0.35rem 0 0;
}

#active-duty-table .active-duty-notes-body ul,
#active-duty-table .active-duty-notes-body ol {
    padding-left: 1.2rem;
}

#active-duty-table .active-duty-notes-body h1,
#active-duty-table .active-duty-notes-body h2,
#active-duty-table .active-duty-notes-body h3,
#active-duty-table .active-duty-notes-body h4 {
    display: block;
    font-size: 0.95rem;
    margin: 0.35rem 0 0.2rem;
}

#active-duty-table .doll-badge-stack {
    gap: 0.2rem;
}

#active-duty-table .doll-badge--compact {
    padding: 0.1rem 0.3rem;
    font-size: 0.65rem;
}

#active-duty-table .doll-badge--compact .doll-badge__icon {
    width: 12px;
    height: 12px;
    max-width: 12px;
    max-height: 12px;
}

.active-duty-release-stack {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.1rem;
    line-height: 1.1;
}

.active-duty-release-month {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--gfl-text-muted, #8b9cb3);
    text-transform: uppercase;
}

.active-duty-release-year {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--gfl-text, inherit);
}

.active-duty-region {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.active-duty-region-icon {
    font-size: 1.2rem;
    line-height: 1;
}

.active-duty-region-icon--global {
    color: #4a9eff;
}

.active-duty-region-icon--china {
    color: #e85d4c;
}

[data-theme="light"] .active-duty-region-icon--global {
    color: #2563eb;
}

[data-theme="light"] .active-duty-region-icon--china {
    color: #dc2626;
}

.active-duty-text-cell {
    line-height: 1.25;
}

#active-duty-table .active-duty-th-recommended {
    font-size: 0.8rem;
    font-weight: 600;
    border-bottom: 0;
    padding-bottom: 0.15rem;
}

#active-duty-table .active-duty-sub-th {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--gfl-text-muted, #8b9cb3);
    padding-top: 0.15rem;
}

.active-duty-rec-v,
.active-duty-rec-weapon {
    text-align: center;
}

.active-duty-rec-v {
    font-size: 0.85rem;
    padding-left: 0.2rem !important;
    padding-right: 0.2rem !important;
}

.active-duty-rec-weapon {
    max-width: 9.5rem;
    min-width: 0;
    font-size: 0.8rem;
    vertical-align: middle;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.active-duty-priority-cell {
    width: 7.25rem;
    min-width: 7.25rem;
    max-width: 7.25rem;
    white-space: nowrap;
    vertical-align: middle;
    background-color: inherit;
}

.active-duty-th-priority {
    vertical-align: middle;
    width: 7.25rem;
}

.active-duty-th-priority-stack {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.1rem;
    line-height: 1.1;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
}

.active-duty-th-priority-line {
    display: block;
    white-space: nowrap;
}

.pull-priority-badge {
    display: inline-block;
    font-size: 0.82rem;
    font-weight: 700;
    padding: 0.32rem 0.6rem;
    border-radius: 0.3rem;
    line-height: 1.25;
    border: 1px solid rgba(0, 0, 0, 0.15);
    white-space: nowrap;
}

.pull-priority-badge--goat {
    background-color: var(--gfl-element-corrosion);
    color: #fff;
    border-color: var(--gfl-element-corrosion);
}

.pull-priority-badge--core {
    background-color: var(--gfl-element-hydro);
    color: #fff;
    border-color: var(--gfl-element-hydro);
}

.pull-priority-badge--solid {
    background-color: var(--gfl-element-freeze);
    color: #0d1e26;
    border-color: var(--gfl-element-freeze);
}

.pull-priority-badge--decent {
    background-color: var(--gfl-element-electric);
    color: #1a1a1a;
    border-color: var(--gfl-element-electric);
}

.pull-priority-badge--retired {
    background-color: var(--gfl-element-burn);
    color: #fff;
    border-color: var(--gfl-element-burn);
}

/* Filter chips: tint when selected */
.btn-check:checked + .dolls-filter-btn--priority-goat {
    background-color: var(--gfl-element-corrosion);
    border-color: var(--gfl-element-corrosion);
    color: #fff;
}

.btn-check:checked + .dolls-filter-btn--priority-core {
    background-color: var(--gfl-element-hydro);
    border-color: var(--gfl-element-hydro);
    color: #fff;
}

.btn-check:checked + .dolls-filter-btn--priority-solid {
    background-color: var(--gfl-element-freeze);
    border-color: var(--gfl-element-freeze);
    color: #0d1e26;
}

.btn-check:checked + .dolls-filter-btn--priority-decent {
    background-color: var(--gfl-element-electric);
    border-color: var(--gfl-element-electric);
    color: #1a1a1a;
}

.btn-check:checked + .dolls-filter-btn--priority-retired {
    background-color: var(--gfl-element-burn);
    border-color: var(--gfl-element-burn);
    color: #fff;
}

.active-duty-attribution {
    text-align: center;
    line-height: 1.45;
    width: 100%;
}

/* Filter bar row 2: all three controls centered as one group */
.active-duty-controls-row {
    display: flex;
    justify-content: center;
    width: 100%;
    margin-top: 0.65rem;
}

.active-duty-controls-inner {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-end;
    gap: 0.65rem 1.25rem;
    max-width: 100%;
}

.active-duty-control-field {
    display: flex;
    flex-direction: column;
    flex: 0 0 auto;
}

.active-duty-control-field--search {
    width: min(11rem, 42vw);
}

.active-duty-control-field--sort {
    width: min(10.5rem, 38vw);
}

.active-duty-control-field--priority {
    flex: 0 0 auto;
    max-width: 100%;
}

.active-duty-controls-row .form-label {
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
    line-height: 1.2;
}

.active-duty-control-body {
    display: flex;
    align-items: center;
    min-height: 31px;
}

.active-duty-control-body .form-control-sm,
.active-duty-control-body .form-select-sm {
    width: 100%;
}

.active-duty-control-field--priority .form-label {
    text-align: center;
    width: 100%;
}

#dolls-active-duty-filters .dolls-filter-segment--priority {
    justify-content: flex-start;
}

#dolls-active-duty-filters .dolls-filter-segment--priority .dolls-filter-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 31px;
    box-sizing: border-box;
}

/* Meta Guide version banner */
.meta-guide-version-banner .meta-guide-banner-title-row {
    flex-wrap: wrap;
}

.meta-guide-game-version {
    font-weight: 500;
}

.meta-guide-diff-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.meta-guide-stat--up {
    color: var(--bs-success, #198754);
}

.meta-guide-stat--down {
    color: var(--bs-warning, #ffc107);
}

.meta-guide-stat--new {
    color: var(--bs-info, #0dcaf0);
}

.meta-guide-changelog-list {
    max-height: 12rem;
    overflow-y: auto;
    padding-left: 1.25rem;
}

.meta-guide-changelog-details summary {
    cursor: pointer;
}

/* Row change highlighting */
#active-duty-table.meta-guide-changes-off .meta-guide-row--up,
#active-duty-table.meta-guide-changes-off .meta-guide-row--down,
#active-duty-table.meta-guide-changes-off .meta-guide-row--new,
#active-duty-table.meta-guide-changes-off .meta-guide-row--edited {
    border-left-color: transparent !important;
}

#active-duty-table .meta-guide-row--up {
    border-left: 3px solid var(--bs-success, #198754);
}

#active-duty-table .meta-guide-row--down {
    border-left: 3px solid var(--bs-warning, #ffc107);
}

#active-duty-table .meta-guide-row--new {
    border-left: 3px solid var(--bs-info, #0dcaf0);
}

#active-duty-table .meta-guide-row--edited {
    border-left: 3px solid rgba(108, 117, 125, 0.45);
}

.meta-guide-new-badge {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: var(--bs-info, #0dcaf0);
    margin-left: 0.25rem;
}

.meta-guide-edited-dot {
    color: var(--bs-secondary, #6c757d);
    margin-left: 0.15rem;
}

.pull-priority-delta {
    font-size: 0.75em;
    margin-left: 0.2rem;
    font-weight: 700;
}

.pull-priority-delta--up {
    color: var(--bs-success, #198754);
}

.pull-priority-delta--down {
    color: var(--bs-warning, #ffc107);
}
