@charset "UTF-8";

/*
    stack-calculator-v1_0.css
    Estilos específicos da página "Calculadora de Stacks, Shulkers e Baús".
    Depende de principal-v2_0.css e dos componentes genéricos de tools-v1_0.css.
*/

/* ── Quantidade de itens ────────────────────────────────────────────────── */
.item-qty-field label {
    display: block;
    font-size: 0.85em;
    color: #cfd8dc;
    margin-bottom: 8px;
    font-weight: bold;
}

.item-qty-field input {
    background-color: var(--color06);
    color: white;
    border: 2px solid var(--color01);
    border-radius: 8px;
    font-family: monospace;
    font-size: 1.3em;
    font-weight: bold;
    height: 50px;
    padding: 0 16px;
}

.item-qty-field input:focus {
    border-color: var(--color02);
    box-shadow: 0 0 5px var(--color02);
    outline: none;
}

/* ── Tamanho do stack ───────────────────────────────────────────────────── */
.stack-size-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.stack-size-card {
    background: var(--color05);
    border: 2px solid transparent;
    border-radius: 8px;
    padding: 14px 10px;
    text-align: center;
    cursor: pointer;
}

.stack-size-card i {
    display: block;
    font-size: 1.3em;
    color: var(--color01);
    margin-bottom: 8px;
}

.stack-size-card span {
    display: block;
    font-size: 0.85em;
    font-weight: bold;
    color: white;
}

.stack-size-card:hover {
    border-color: var(--color01);
}

.stack-size-card.is-active {
    background: var(--color06);
    border-color: var(--color02);
}

.stack-size-card.is-active i,
.stack-size-card.is-active span {
    color: var(--color02);
}

.custom-stack-field {
    display: none;
    margin-top: 12px;
}

.custom-stack-field.is-visible {
    display: block;
}

.custom-stack-field label {
    display: block;
    font-size: 0.8em;
    color: var(--color04);
    margin-bottom: 6px;
}

.custom-stack-field input {
    background-color: var(--color06);
    color: white;
    border: 2px solid var(--color01);
    border-radius: 8px;
    font-family: monospace;
    height: 42px;
    padding: 0 12px;
}

/* ── Itens comuns ───────────────────────────────────────────────────────── */
.item-search-input {
    background-color: var(--color06);
    color: white;
    border: 2px solid var(--color01);
    border-radius: 8px;
    height: 44px;
    padding: 0 14px;
    margin-bottom: 14px;
}

.item-search-input:focus {
    border-color: var(--color02);
    box-shadow: 0 0 5px var(--color02);
    outline: none;
}

.item-list-scroll {
    max-height: 230px;
    overflow-y: auto;
    padding-right: 4px;
}

.item-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 8px;
}

.item-card {
    background: var(--color05);
    border: 2px solid transparent;
    border-radius: 8px;
    padding: 8px 6px;
    text-align: center;
    cursor: pointer;
}

.item-card:hover {
    border-color: var(--color01);
}

.item-card.is-active {
    border-color: var(--color02);
    background: var(--color06);
}

.item-card-icon {
    font-size: 1.4em;
    line-height: 1;
    margin-bottom: 4px;
}

.item-card-name {
    font-size: 0.72em;
    color: white;
    font-weight: bold;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.item-card-stack {
    font-size: 0.65em;
    color: var(--color04);
    margin-top: 2px;
}

.item-list-empty {
    text-align: center;
    color: var(--color04);
    font-size: 0.85em;
    padding: 20px 0;
    grid-column: 1 / -1;
}

/* ── Visualização de armazenamento ──────────────────────────────────────── */
.storage-viz-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.storage-viz-row:last-child {
    margin-bottom: 0;
}

.storage-viz-icon {
    font-size: 1.3em;
    width: 26px;
    text-align: center;
    flex-shrink: 0;
}

.storage-viz-body {
    flex: 1;
    min-width: 0;
}

.storage-viz-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 6px;
}

.storage-viz-name {
    font-size: 0.9em;
    font-weight: bold;
    color: white;
}

.storage-viz-count {
    font-size: 0.85em;
    font-weight: bold;
    color: white;
    font-family: monospace;
}

.storage-viz-bar-track {
    height: 8px;
    border-radius: 4px;
    background: var(--color06);
    overflow: hidden;
}

.storage-viz-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.15s ease;
}

.storage-viz-bar-fill.is-full {
    background: #3d5aa8;
}

.storage-viz-bar-fill.is-partial {
    background: var(--color01);
}

.storage-viz-caption {
    font-size: 0.72em;
    color: var(--color04);
    margin-top: 4px;
}

/* ── Inventário do shulker (grid de slots) ──────────────────────────────── */
.shulker-inventory-grid {
    display: grid;
    grid-template-columns: repeat(9, 1fr);
    gap: 6px;
    margin-bottom: 14px;
}

.shulker-slot {
    aspect-ratio: 1;
    border-radius: 5px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 0.65em;
    color: white;
    font-weight: bold;
}

.shulker-slot.is-full {
    background: #16224a;
    border: 1px solid #2c3d78;
}

.shulker-slot.is-partial {
    background: rgba(255, 153, 0, 0.25);
    border: 1px solid var(--color01);
}

.shulker-slot.is-empty {
    background: rgba(255, 255, 255, 0.03);
    border: 1px dashed rgba(255, 255, 255, 0.12);
}

.shulker-slot-icon {
    font-size: 1.2em;
    line-height: 1;
}

.shulker-slot-count {
    margin-top: 2px;
}

.shulker-legend {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
    font-size: 0.8em;
    color: #cfd8dc;
}

.shulker-legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.shulker-legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 3px;
    flex-shrink: 0;
}

.shulker-legend-dot.is-full { background: #16224a; border: 1px solid #2c3d78; }
.shulker-legend-dot.is-partial { background: rgba(255, 153, 0, 0.25); border: 1px solid var(--color01); }
.shulker-legend-dot.is-empty { background: rgba(255, 255, 255, 0.03); border: 1px dashed rgba(255, 255, 255, 0.2); }

/* ── Responsivo ─────────────────────────────────────────────────────────── */
@media screen and (max-width: 700px) {
    .stack-size-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .item-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .shulker-inventory-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}

@media screen and (max-width: 420px) {
    .item-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .shulker-inventory-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}