/* =========================================================
   ArmorPlus Wiki - Armor Index
   /armorplus/wiki/armor/armor-page.css
   ========================================================= */


/* =========================================================
   Armor Category Grid
   ========================================================= */

.armor-index-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;

    width: 100%;
    margin-top: 1.25rem;

    align-items: stretch;
}


/* =========================================================
   Armor Cards
   ========================================================= */

.armor-index-grid .armor-index-card {
    box-sizing: border-box;

    width: 100%;
    min-width: 0;
    height: auto;
    min-height: 0;

    margin: 0;

    align-self: stretch;
}


/*
 * Prevent card content from forcing the grid column
 * wider than its available space.
 */

.armor-index-grid .armor-index-card > * {
    min-width: 0;
}


/* =========================================================
   Armor Card Text
   ========================================================= */

.armor-index-grid .armor-index-card h3 {
    margin-top: 0;
}

.armor-index-grid .armor-index-card p {
    overflow-wrap: anywhere;
}


/* =========================================================
   Armor Effects
   ========================================================= */

.armor-index-grid .armor-index-effects {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;

    margin-top: 0.65rem;
}

.armor-index-grid .armor-index-effect,
.armor-index-grid .armor-index-effects span {
    display: inline-flex;
    align-items: center;

    width: auto;
    max-width: 100%;

    white-space: normal;
}


/* =========================================================
   Armor Stats
   ========================================================= */

.armor-index-grid .armor-index-stats {
    display: flex;
    flex-wrap: wrap;
    align-items: center;

    gap: 0.35rem 0.75rem;

    margin-top: 0.75rem;
}


/* =========================================================
   Armor Icons
   ========================================================= */

.armor-index-grid .armor-index-icons {
    flex-shrink: 0;
}


/* =========================================================
   Last Odd Card
   ========================================================= */

/*
 * Categories such as Tier 1 contain five armor sets.
 *
 * Keep the final card at normal column width rather than
 * stretching it across both columns.
 */

.armor-index-grid .armor-index-card:last-child:nth-child(odd) {
    grid-column: auto;
}


/* =========================================================
   Tablet
   ========================================================= */

@media (max-width: 900px) {
    .armor-index-grid {
        gap: 0.85rem;
    }
}


/* =========================================================
   Mobile
   ========================================================= */

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

    .armor-index-grid .armor-index-card {
        width: 100%;
    }
}


/* =========================================================
   Small Mobile
   ========================================================= */

@media (max-width: 480px) {
    .armor-index-grid {
        gap: 0.75rem;
        margin-top: 1rem;
    }

    .armor-index-grid .armor-index-stats {
        gap: 0.3rem 0.6rem;
    }
}
