.settings-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 240px;
    background-color: var(--bg2);
    border: 1px solid var(--border);
    box-shadow: 0 8px 24px rgba(0,0,0,0.5);
    z-index: 2000;
}

@media (max-width: 768px) {
    .settings-dropdown {
        position: fixed;
        width: calc(100% - 30px);
        max-width: 240px;
        right: 15px;
        top: auto;
        bottom: 15px;
        max-height: calc(100vh - 130px);
        overflow-y: auto;
        z-index: 3000 !important;
    }
}

@media (max-width: 600px) {
    .settings-dropdown {
        width: calc(100% - 20px);
        right: 10px;
        bottom: 10px;
        max-width: 100%;
    }
}

.settings-header {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    background-color: var(--bg3);
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text);
}

.settings-section {
    padding: 12px 16px;
}

.settings-section-title {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.7px;
    color: var(--text2);
    margin-bottom: 10px;
}

.settings-separator {
    border-top: 1px solid var(--border);
}

.settings-themes {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.settings-theme-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color:  var(--text);
    transition: transform 0.15s, border-color 0.15s;
    padding: 0;

    &:hover {
        transform: scale(1.15);
    }

    .active {
        border-color: var(--text);
        transform: scale(1.1);
    }
}

.settings-theme-toggle {
    width: 100%;
    background-color: var(--bg3);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 8px 12px;
    cursor: pointer;
    font-family: var(--typography);
    font-size: 0.88rem;
    transition: background-color 0.1s;
    text-align: left;

    &:hover {
        background-color: var(--bg4);
    }
}

.settings-theme-toggle-inner {
    display: flex;
    align-items: center;
    gap: 8px;
}

.settings-theme-toggle-badge {
    margin-left: auto;
    background-color: var(--rhpz-orange);
    color: #111;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 6px;
}

.settings-perpage {
    display: flex;
    gap: 6px;
}

.settings-perpage-btn {
    flex: 1;
    padding: 6px 4px;
    background-color: var(--bg3);
    border: 1px solid var(--border);
    color: var(--text2);
    font-size: 0.85rem;
    cursor: pointer;
    font-family: var(--typography);
    transition: all 0.1s;

    &:hover {
        background-color: var(--bg4);
        color: var(--text);
    }

    .active {
        background-color: var(--rhpz-orange);
        border-color: var(--rhpz-orange);
        color: var(--text3);
        font-weight: 600;
    }
}

.settings-link {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 8px 10px;
    color: var(--text);
    text-decoration: none;
    font-size: 0.88rem;
    transition: background-color 0.1s;
    border: 1px solid transparent;

    &:hover {
        background-color: var(--bg3);
        border-color: var(--border);
        text-decoration: none;
    }
}

.settings-link--danger {
    color: var(--error);

    &:hover {
        background-color: rgba(229, 115, 115, 0.08);
        border-color: rgba(229, 115, 115, 0.3);
    }
}
