/* =========================================================
   THEME SELECTOR
   ========================================================= */

.theme-selector {
    position: relative;

    display: flex;
    align-items: center;

    margin-left: auto;
}


/* =========================================================
   THEME BUTTON
   ========================================================= */

.theme-button {
    width: 38px;
    height: 38px;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 0;

    background: transparent;
    color: var(--text-secondary);

    border: 1px solid transparent;
    border-radius: 8px;

    cursor: pointer;

    transition:
        background-color 0.18s ease,
        border-color 0.18s ease,
        color 0.18s ease;
}

.theme-button:hover {
    background: var(--surface-hover);
    color: var(--text-strong);

    border-color: var(--border);
}

.theme-button:active {
    background: var(--surface-elevated);
}


/* =========================================================
   ICON
   ========================================================= */

.theme-icon {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 18px;
    height: 18px;

    font-size: 17px;
    line-height: 1;

    transition:
        transform 0.2s ease;
}

.theme-button:hover .theme-icon {
    transform: rotate(12deg);
}


/* =========================================================
   MENU
   ========================================================= */

.theme-menu {
    position: absolute;

    top: calc(100% + 10px);
    right: 0;

    width: 170px;

    padding: 6px;

    background: var(--surface-elevated);

    border: 1px solid var(--border);
    border-radius: 10px;

    box-shadow: var(--shadow-md);

    z-index: 200;
}


/* =========================================================
   OPTIONS
   ========================================================= */

.theme-option {
    width: 100%;
    min-height: 38px;

    display: flex;
    align-items: center;

    gap: 10px;

    padding: 0 10px;

    background: transparent;
    color: var(--text-secondary);

    border: 0;
    border-radius: 7px;

    font-size: 13px;
    font-weight: 500;

    text-align: left;

    cursor: pointer;

    transition:
        background-color 0.16s ease,
        color 0.16s ease;
}

.theme-option:hover {
    background: var(--surface-hover);
    color: var(--text-strong);
}


/* Ícone da opção */

.theme-option > span:first-child {
    width: 18px;

    display: flex;
    align-items: center;
    justify-content: center;

    color: var(--text-muted);

    font-size: 15px;
}

.theme-option:hover > span:first-child {
    color: var(--accent);
}


/* =========================================================
   OPÇÃO ATIVA
   ========================================================= */

.theme-option.active {
    background: var(--accent-soft);
    color: var(--accent);
}

.theme-option.active > span:first-child {
    color: var(--accent);
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 700px) {

    .theme-selector {
        margin-left: auto;
    }

    .theme-button {
        width: 36px;
        height: 36px;
    }

    .theme-menu {
        right: -4px;
    }
}