@charset "UTF-8";

/*
    enchanting-simulator-v1_0.css
    Estilos específicos da página "Simulador de Mesa de Encantamentos".
    Depende de principal-v2_1.css e dos componentes genéricos de tools-v1_1.css
    (reaproveita .result-grid, .result-card e .formulas-box de lá).
*/

/* ── Mesa de encantamentos (visual) ─────────────────────────────────────── */
.enchant-table-display {
    background: radial-gradient(ellipse at center, #241245 0%, #0e0620 100%);
    border-radius: 8px;
    padding: 24px 16px;
    text-align: center;
}

.enchant-table-runes {
    font-family: monospace;
    font-size: 0.85em;
    color: #a374e8;
    letter-spacing: 2px;
    opacity: 0.7;
    margin-bottom: 16px;
    word-break: break-all;
}

.enchant-table-book {
    font-size: 2.4em;
    margin-bottom: 16px;
    filter: drop-shadow(0 0 10px #7fc3ff);
}

.enchant-slots-row {
    display: flex;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.enchant-slot-visual {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: background 0.15s ease;
    min-width: 90px;
}

.enchant-slot-visual:hover {
    background: rgba(163, 116, 232, 0.12);
}

.enchant-slot-visual.is-locked {
    opacity: 0.4;
    cursor: not-allowed;
}

.enchant-slot-icon {
    width: 46px;
    height: 46px;
    border-radius: 6px;
    background: rgba(163, 116, 232, 0.15);
    border: 1px solid rgba(163, 116, 232, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3em;
    color: #c9a6ff;
}

.enchant-slot-level {
    color: #c9a6ff;
    font-weight: bold;
    font-size: 1.1em;
}

.enchant-slot-cost-row {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.72em;
    color: #7fc3ff;
}

.enchant-slot-names {
    font-size: 0.68em;
    color: #9d8fc4;
    text-align: center;
    line-height: 1.4;
}

.enchant-bookshelves-row {
    display: flex;
    justify-content: center;
    gap: 4px;
    flex-wrap: wrap;
}

.bookshelf-icon {
    width: 20px;
    height: 20px;
    background: rgba(255, 153, 0, 0.15);
    border: 1px solid rgba(255, 153, 0, 0.4);
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65em;
    color: var(--color01);
}

.bookshelf-icon.is-inactive {
    opacity: 0.15;
}

/* ── Configuração ───────────────────────────────────────────────────────── */
.enchant-config-row {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

.enchant-config-block {
    flex: 1;
    min-width: 220px;
    text-align: left;
}

.enchant-config-block label {
    display: block;
    font-size: 0.85em;
    color: #cfd8dc;
    margin-bottom: 8px;
    font-weight: bold;
}

.bookshelf-slider-row {
    display: flex;
    align-items: center;
    gap: 14px;
}

.bookshelf-slider-row input[type="range"] {
    flex: 1;
    height: 6px;
    border-radius: 3px;
    background: var(--color06);
    -webkit-appearance: none;
    appearance: none;
}

.bookshelf-slider-row input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--color01);
    cursor: pointer;
    border: 2px solid var(--color06);
}

.bookshelf-slider-value {
    font-family: monospace;
    font-weight: bold;
    color: var(--color02);
    width: 34px;
    text-align: right;
}

.enchant-config-block input[type="number"] {
    background-color: var(--color06);
    color: white;
    border: 2px solid var(--color01);
    border-radius: 8px;
    font-family: monospace;
    font-size: 1.15em;
    font-weight: bold;
    height: 46px;
    padding: 0 14px;
    width: 100%;
    box-sizing: border-box;
}

.enchant-config-block input[type="number"]:focus {
    border-color: var(--color02);
    box-shadow: 0 0 5px var(--color02);
    outline: none;
}

.enchant-config-hint {
    font-size: 0.72em;
    color: var(--color04);
    margin-top: 6px;
}

/* ── Item para encantar (grid) ──────────────────────────────────────────── */
.item-type-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    margin-top: 16px;
}

.item-type-card {
    background: var(--color05);
    border: 2px solid transparent;
    border-radius: 8px;
    padding: 12px 6px;
    text-align: center;
    cursor: pointer;
}

.item-type-card-icon {
    font-size: 1.3em;
    margin-bottom: 6px;
    line-height: 1;
}

.item-type-card-name {
    font-size: 0.75em;
    font-weight: bold;
    color: white;
}

.item-type-card:hover {
    border-color: var(--color01);
}

.item-type-card.is-active {
    background: var(--color06);
    border-color: #3d5aa8;
}

.item-type-card.is-active .item-type-card-name {
    color: #7fb3ff;
}

/* ── Opções de encantamento (slots detalhados) ──────────────────────────── */
.enchant-option-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    background: var(--color05);
    border-radius: 8px;
    padding: 14px 16px;
    margin-bottom: 10px;
    cursor: pointer;
    border: 2px solid transparent;
    flex-wrap: wrap;
}

.enchant-option-row:last-child {
    margin-bottom: 0;
}

.enchant-option-row:hover {
    border-color: var(--color01);
}

.enchant-option-row.is-locked {
    opacity: 0.5;
    cursor: not-allowed;
}

.enchant-option-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.slot-badge {
    background: rgba(163, 116, 232, 0.2);
    color: #c9a6ff;
    font-size: 0.75em;
    font-weight: bold;
    padding: 3px 10px;
    border-radius: 10px;
    flex-shrink: 0;
}

.enchant-option-title {
    font-size: 0.9em;
    font-weight: bold;
    color: white;
    flex-shrink: 0;
}

.enchant-pill {
    display: inline-block;
    font-size: 0.78em;
    font-weight: bold;
    padding: 3px 10px;
    border-radius: 10px;
    margin-right: 4px;
}

.enchant-pill.rarity-common { background: rgba(207, 216, 220, 0.15); color: #cfd8dc; }
.enchant-pill.rarity-uncommon { background: rgba(58, 201, 160, 0.18); color: #3ac9a0; }
.enchant-pill.rarity-rare { background: rgba(163, 116, 232, 0.2); color: #c9a6ff; }
.enchant-pill.rarity-veryrare { background: rgba(217, 69, 69, 0.18); color: #ff8080; }

.enchant-option-right {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85em;
    color: #cfd8dc;
    flex-shrink: 0;
}

.availability-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.availability-dot.is-ok { background: #3ac9a0; }
.availability-dot.is-locked-dot { background: var(--color04); }

.enchant-cost-value {
    font-family: monospace;
    color: var(--color02);
}

.enchant-cost-lapis {
    font-family: monospace;
    color: #7fb3ff;
}

.reroll-button {
    width: 100%;
    background: var(--color06);
    color: var(--color02);
    border: 2px solid var(--color01);
    border-radius: 8px;
    padding: 14px;
    font-size: 1em;
    font-weight: bold;
    cursor: pointer;
    margin-top: 4px;
}

.reroll-button:hover {
    background: var(--color05);
    color: var(--color01);
}

.reroll-hint {
    font-size: 0.78em;
    color: var(--color04);
    margin-top: 10px;
    text-align: center;
}

/* ── Estatísticas da sessão ─────────────────────────────────────────────── */
.stats-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.session-stat-card {
    background: var(--color05);
    border-radius: 8px;
    padding: 12px 14px;
    text-align: left;
}

.session-stat-label {
    font-size: 0.7em;
    letter-spacing: 0.06em;
    color: var(--color04);
    text-transform: uppercase;
    margin-bottom: 6px;
}

.session-stat-value {
    font-family: monospace;
    font-size: 1.3em;
    font-weight: bold;
    color: white;
}

.session-stat-sub {
    font-size: 0.72em;
    color: var(--color01);
    margin-top: 2px;
}

/* ── Histórico de encantamentos ─────────────────────────────────────────── */
.enchant-history {
    max-height: 280px;
    overflow-y: auto;
}

.enchant-history-empty {
    text-align: center;
    color: var(--color04);
    font-size: 0.85em;
    padding: 20px 0;
}

.enchant-history-row {
    padding: 10px 6px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    font-size: 0.85em;
    text-align: left;
}

.enchant-history-row:last-child {
    border-bottom: none;
}

.enchant-history-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.enchant-history-item {
    color: white;
    font-weight: bold;
}

.enchant-history-cost {
    color: var(--color04);
    font-size: 0.85em;
}

/* ── Responsivo ─────────────────────────────────────────────────────────── */
@media screen and (max-width: 700px) {
    .item-type-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .enchant-slots-row {
        gap: 12px;
    }

    .enchant-option-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .enchant-option-right {
        width: 100%;
        justify-content: space-between;
    }
}