/* Особые боеприпасы: каталог, профили Mk XVI и раскрываемые описания. */

.ammunition-heading {
    margin-bottom: 1.5rem;
}

.ammunition-heading h1 {
    margin-bottom: 0.35rem;
}

.ammunition-heading p {
    max-width: 72ch;
    text-align: left;
}

.ammunition-index {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.6rem;
    margin: 1.5rem 0 2rem;
}

.ammunition-index a {
    padding: 0.65rem 0.75rem;
    border: 1px solid var(--border-color);
    background: var(--table-row-alt);
    text-align: center;
}

.ammunition-filter {
    margin: 1.5rem 0 2rem;
    padding: 1rem;
    border: 1px solid var(--border-color);
    background: var(--table-row-alt);
}

.ammunition-filter h2 {
    margin: 0 0 0.8rem;
    font-size: 1.2rem;
}

.ammunition-filter-controls {
    display: grid;
    grid-template-columns: minmax(14rem, 1fr);
    gap: 0.35rem 0.8rem;
    align-items: end;
}

.ammunition-filter-controls label {
    grid-column: 1 / -1;
    color: var(--link-color);
    font-size: 0.9rem;
    font-weight: bold;
}

.ammunition-filter-controls input {
    min-height: 2.6rem;
    border: 1px solid var(--border-color);
    border-radius: 0;
    background: var(--bg-color);
    color: var(--text-color);
    font: inherit;
}

.ammunition-filter-controls input {
    width: 100%;
    padding: 0.45rem 2.8rem 0.45rem 0.6rem;
}

.ammunition-results,
.ammunition-message {
    margin: 0.8rem 0 0;
    text-align: left;
}

.ammunition-results {
    font-size: 0.9rem;
}

.ammunition-table-wrap {
    width: 100%;
    overflow-x: auto;
    border: 1px solid var(--border-color);
}

.ammunition-table {
    width: 100%;
    border-collapse: collapse;
    font-family: var(--font-interface);
    font-size: 0.88rem;
    text-align: left;
}

.ammunition-catalogue {
    min-width: 760px;
}

.ammunition-profiles {
    min-width: 980px;
}

.ammunition-table th,
.ammunition-table td {
    padding: 0.42rem 0.5rem;
    border-right: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    line-height: 1.3;
    text-align: left;
    vertical-align: top;
}

.ammunition-table th:last-child,
.ammunition-table td:last-child {
    border-right: 0;
}

.ammunition-table thead th {
    background: var(--table-header-bg);
    color: var(--table-header-color);
    white-space: nowrap;
}

.ammunition-table td:nth-child(2),
.ammunition-profiles td:nth-child(3),
.ammunition-profiles td:nth-child(5) {
    white-space: nowrap;
}

.ammunition-properties {
    display: flex;
    flex-wrap: wrap;
    gap: 0.18rem;
    min-width: 12rem;
}

.ammunition-toggle {
    display: grid;
    grid-template-columns: 1rem minmax(0, 1fr);
    gap: 0.25rem;
    width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--link-color);
    font: inherit;
    font-weight: bold;
    line-height: inherit;
    text-align: left;
    cursor: pointer;
}

.ammunition-toggle:hover span:last-child,
.ammunition-toggle:focus-visible span:last-child {
    text-decoration: underline;
}

.ammunition-toggle-icon {
    text-align: center;
}

.ammunition-description-row td {
    padding: 0;
    background: var(--table-row-alt);
}

.ammunition-description {
    max-width: 100ch;
    padding: 0.75rem 0.9rem;
}

.ammunition-description p {
    margin: 0;
}

.ammunition-description p + p {
    margin-top: 0.65rem;
}

@media (max-width: 760px) {
    .ammunition-index {
        grid-template-columns: 1fr;
    }

    .ammunition-filter-controls {
        grid-template-columns: 1fr;
    }

    .ammunition-filter-controls label {
        grid-column: auto;
    }
}
