@charset "UTF-8";

:root {
    --color01: #FF9900;
    --color02: #FFE000;
    --color03: #FF4800;
    --color04: #626d6d;
    --color05: #353b3b;
    --color06: #1b1d1d;
    --toggle-on: var(--color01);
}

/* ===== Container geral ===== */
.gamerule-container {
    background: rgb(30, 30, 30);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    box-sizing: border-box;
    text-align: left;
}

/* ===== Barra de busca ===== */
.gamerule-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
}

.gamerule-search {
    flex: 1;
    min-width: 180px;
    background-color: var(--color05);
    color: white;
    border: 2px solid var(--color01);
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 15px;
    box-sizing: border-box;
}

.gamerule-search::placeholder {
    color: #cfcfcf;
}

.gamerule-search:focus {
    border-color: var(--color03);
    box-shadow: 0 0 5px var(--color03);
    outline: none;
}

/* ===== Filtros de categoria ===== */
.gamerule-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.gamerule-filter-btn {
    background-color: var(--color05);
    color: var(--color02);
    font-size: 0.85em;
    padding: 9px 16px;
    border-radius: 20px;
    border: 2px solid var(--color01);
    cursor: pointer;
    white-space: nowrap;
    transition: background-color .15s, color .15s;
}

.gamerule-filter-btn:hover {
    background-color: var(--color06);
}

.gamerule-filter-btn.active {
    background-color: var(--color03);
    color: white;
    border-color: var(--color03);
}

/* ===== Contador de alterações ===== */
.gamerule-status-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 10px;
    font-size: 0.9em;
    color: #cfcfcf;
}

.gamerule-status-bar strong {
    color: var(--color02);
}

.gamerule-clear-btn {
    background: none;
    border: none;
    color: var(--color03);
    text-decoration: underline;
    cursor: pointer;
    font-size: 0.9em;
    padding: 0;
}

.gamerule-clear-btn:hover {
    color: var(--color01);
}

/* ===== Categoria (título) ===== */
.gamerule-category-title {
    color: #8f8f8f;
    font-size: 0.8em;
    font-weight: bold;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin: 18px 0 6px 4px;
}

.gamerule-category-title:first-child {
    margin-top: 0;
}

/* ===== Lista de regras ===== */
.gamerule-list {
    display: flex;
    flex-direction: column;
}

.gamerule-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.gamerule-row:last-child {
    border-bottom: none;
}

.gamerule-row.is-changed {
    background-color: rgba(255, 153, 0, 0.08);
    border-radius: 8px;
}

.gamerule-row-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.gamerule-row-name {
    font-family: monospace;
    font-size: 0.95em;
    color: white;
    font-weight: bold;
    word-break: break-word;
}

.gamerule-row-name .gr-edition-tag {
    font-family: var(--font-default);
    font-size: 0.7em;
    color: var(--color01);
    margin-left: 6px;
    font-weight: normal;
}

.gamerule-row-desc {
    font-size: 0.85em;
    color: #b8b8b8;
    margin-top: 2px;
}

.gamerule-row-control {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ===== Toggle switch ===== */
.gr-switch {
    position: relative;
    display: inline-block;
    width: 46px;
    height: 26px;
    flex-shrink: 0;
    cursor: pointer;
}

.gr-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.gr-switch-slider {
    position: absolute;
    inset: 0;
    background-color: #4a4a4a;
    border-radius: 26px;
    transition: background-color .2s;
}

.gr-switch-slider::before {
    content: "";
    position: absolute;
    height: 20px;
    width: 20px;
    left: 3px;
    top: 3px;
    background-color: white;
    border-radius: 50%;
    transition: transform .2s;
}

.gr-switch input:checked + .gr-switch-slider {
    background-color: var(--toggle-on);
    box-shadow: 0 0 6px rgba(255, 153, 0, 0.6);
}

.gr-switch input:checked + .gr-switch-slider::before {
    transform: translateX(20px);
}

/* ===== Input numérico da lista ===== */
.gr-number-input {
    background-color: var(--color06);
    color: white;
    border: 2px solid var(--color01);
    border-radius: 6px;
    padding: 6px 8px;
    font-size: 14px;
    width: 90px;
    text-align: center;
    box-sizing: border-box;
}

.gr-number-input:focus {
    border-color: var(--color03);
    box-shadow: 0 0 5px var(--color03);
    outline: none;
}

.gr-reset-single {
    background: none;
    border: none;
    color: #8f8f8f;
    cursor: pointer;
    font-size: 0.95em;
    line-height: 1;
    padding: 2px 4px;
}

.gr-reset-single:hover {
    color: var(--color03);
}

/* ===== Nenhum resultado ===== */
.gamerule-empty {
    text-align: center;
    color: #8f8f8f;
    padding: 30px 10px;
    font-size: 0.95em;
}

/* ===== Saída de comandos ===== */
.gamerule-output {
    background: rgb(30, 30, 30);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 800px;
    margin: 20px auto 0 auto;
    box-sizing: border-box;
    text-align: left;
}

.gamerule-output-empty {
    color: #8f8f8f;
    font-size: 0.95em;
    text-align: center;
    padding: 10px 0;
}

.gamerule-output-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 10px 0;
}

.gamerule-command-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    background-color: rgb(6, 6, 6);
    border-radius: 5px;
    padding: 8px 14px;
}

.gamerule-command-line span.gr-cmd-text {
    font-family: monospace;
    font-size: 15px;
    color: white;
    word-break: break-word;
    cursor: pointer;
}

.gamerule-command-line span.gr-cmd-text:hover {
    color: var(--color03);
}

.gamerule-output-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
    flex-wrap: wrap;
}

@media screen and (max-width: 600px) {
    .gamerule-row {
        flex-wrap: wrap;
    }

    .gamerule-row-control {
        width: 100%;
        justify-content: flex-end;
    }

    .gamerule-container,
    .gamerule-output {
        padding: 14px;
    }
}